当前位置: 代码迷 >> 综合 >> turtlebot2 kinect 激光雷达 自动导航超详细命令
  详细解决方案

turtlebot2 kinect 激光雷达 自动导航超详细命令

热度:8   发布时间:2023-12-08 05:12:53.0

一、turtlebot2

// An highlighted block
roscore
// An highlighted block
roslaunch turtlebot_bringup minimal.launch
// kinect显示图像
roslaunch freenect_launch freenect-registered-xyzrgb.launch
rosrun rqt_image_view rqt_image_view image:/camera/rgb/image_color
// 键盘控制
roslaunch turtlebot_teleop keyboard_teleop.launch
// Kinect建图
roslaunch turtlebot_navigation gmapping_demo.launch
// 启动rviz
roslaunch turtlebot_rviz_launchers view_navigation.launch
// 保存地图
rosrun map_server map_saver -f /home/prototype/map/'地图名'
// 导航
//关闭所有终端
roscore
roslaunch turtlebot_bringup minimal.launch
roslaunch turtlebot_navigation amcl_demo.launch map_file:=/home/prototype/map/'地图名'.yaml
roslaunch turtlebot_rviz_launchers view_navigation.launch --screen
// 打开雷达
cd ~/ydlidar_ws/src/ydlidar/launch
roslaunch lidar_view.launch
// 雷达建图
roslaunch turtlebot_navigation gmapping_demo.launch
roslaunch turtlebot_rviz_launchers view_navigation.launch

二、kinect

// An highlighted block
roscore
// 连接小车
roslaunch turtlebot_bringup minimal.launch
// 启动gmapping,利用kinect v1实现获取深度
roslaunch turtlebot_navigation gmapping_demo.launch
// 启动rviz
roslaunch turtlebot_rviz_launchers view_navigation.launch
// 保存地图
rosrun map_server map_saver -f /home/prototype/map/'地图名'
//关闭所有终端
roscore
// An highlighted block
roslaunch turtlebot_bringup minimal.launch
// An highlighted block
roslaunch turtlebot_navigation amcl_demo.launch map_file:=/home/prototype/map/'地图名'.yaml
// An highlighted block
roslaunch turtlebot_rviz_launchers view_navigation.launch --screen

三、激光雷达导航

// 
roscore
// 打开雷达
cd ~/ydlidar_ws/src/ydlidar/launch
roslaunch lidar_view.launch
// 上网本新开端口,启动turtlebot
roslaunch turtlebot_bringup minimal.launch
// 上网本新开端口,启动gmapping,用于构建地图
roslaunch turtlebot_navigation gmapping_demo.launch
//工作机或上网本新开端口,启动键盘操作Turtlebot
roslaunch turtlebot_teleop keyboard_teleop.launch
//工作机或上网本新开端口,启动rviz,实时查看建图情况
oslaunch turtlebot_rviz_launchers view_navigation.launch
// 保存地图
rosrun map_server map_saver -f /home/prototype/map/sd7

关闭之前打开的所有终端

// 主机上,新终端,启动minimal.launch
roslaunch turtlebot_bringup minimal.launch
// 主机上,新终端,启动amcl_demo.launch, 并指定地图
roslaunch turtlebot_navigation amcl_demo.launch map_file:=/home/prototype/map/sd7.yaml
// An highlighted block
roslaunch turtlebot_rviz_launchers view_navigation.launch --screen
  相关解决方案