Open DunFenTiao opened 6 years ago
配置了rplidar的别名。 制作启动文件。(http://www.ncnynl.com/archives/201611/1095.html)(这里端口为 ttyusb1)
上网本新开端口,打开roscore
$ roscore
上网本新开端口,启动turtlebot
$ roslaunch turtlebot_bringup minimal.launch
上网本新开端口,启动gmapping,用于构建地图
$ roslaunch turtlebot_navigation rplidar_gmapping_demo.launch
工作机或上网本新开端口,启动键盘操作Turtlebot
$ roslaunch turtlebot_teleop keyboard_teleop.launch
工作机或上网本新开端口,启动rviz,实时查看建图情况
$ roslaunch turtlebot_rviz_launchers view_navigation.launch
-√ok: todo: laser的gmapping定位。 进度 : 用test amcl jy.launch测试,不通过。没有map_server。 猜测:需要调节好rbx1_nav turtlebot_navigation的关系。
gmapping ok: hector slam
slove:
The problem was caused by not cleaning up a bad build in my catkin_ws directories. I deleted move_base folders from catkin_ws/devel/ lib and share, along with many other navigation related directories that should not have been there. I then could launch move_base.launch
(参考http://wiki.ros.org/turtlebot_navigation/Tutorials/indigo/Autonomously%20navigate%20in%20a%20known%20map)
roscore
//链接底盘
roslaunch rbx1_bringup turtlebot_minimal_kokubi.launch
//键盘控制
roslaunch turtlebot_teleop keyboard_teleop.launch
//连接激光雷达
roslaunch turtlebot_navigation rplidar_laser.launch
//已知地图定位amcl
roslaunch rbx1_nav tb_demo_amcl.launch map:=map.yaml
//显示仿真
rosrun rviz rviz -d rospack find rbx1_nav
/nav_test.rviz
上网本新开端口,建立目录,保存地图
$ mkdir -p ~/map $ rosrun map_server map_saver -f ~/map/rplidar_gmapping $ ls ~/map #查看内容,包含rplidar_gmapping.pgm rplidar_gmapping.yaml
slove:
ttl转usb处接触不良!
跑真机,建图OK比A1效果好,边缘清晰。建图快。
单独运行movebase Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.101179 timeout was 0.1.
bug Aborting because a valid plan could not be found. Even after executing all recovery behaviors
猜测是move_base的问题
看了古月居博客, base_footprint -> odom->map,后半段断了?
bobo建议,remap过去
roslaunch rbx1_bringup turtlebot_minimal_kokubi.launch roslaunch rplidar_ros rplidar_laser.launch roslaunch turtlebot_navigation amcl_test1.launch map:=c114.yaml roslaunch turtlebot_rviz_launchers view_navigation.launch
-地图放在maps/下面
python go_specific_pointc114.py 在rviz里面选择 point publish 记录下要去的点的前两个坐标。 在go specific point.py里面修改。
实现了三点之间能互相走
rplidar a2
安装: sudo apt-get install ros-indigo-rplidar-ros 安装
测试: Check the authority of rplidar's serial-port :
ls -l /dev |grep ttyUSB
Add the authority of write: (such as /dev/ttyUSB0) (选择没有被占用的口) sudo chmod 666 /dev/ttyUSB0
Start a rplidar node and view the scan result in rviz.
$ roslaunch rplidar_ros view_rplidar.launch