Turtlebot3与ORBSlam3联合仿真
1.实现双机互联运行ROS
(1)主机设置
打开根目录下的.bashrc文件,并添加如下所示的代码:
export ROS_IP=主机IP
export ROS_HOSTNAME=${
ROS_IP}
export ROS_MASTER_URI=http://${ROS_IP}:11311
(2)从机设置
打开根目录下的.bashrc文件,并添加如下所示的代码:
export ROS_IP=从机IP
export ROS_HOSTNAME=${
ROS_IP}
export ROS_MASTER_URI=http://${ROS_IP}:11311
(3)检查是否连通
主机运行
roscore
从机运行
rostopic list
如果出现以下结果说明连接成功
/rosout
/rosout_agg
2.从机运行仿真环境
roslaunch turtlebot3_gazebo turtlebot3_xxx.launch
在主机端查看从机发布的消息是否显示正常,如果正常,在主机端可以看到如下结果:
~$ rostopic list
/camera/depth/camera_info
/camera/depth/image_raw
/camera/depth/points
/camera/parameter_descriptions
/camera/parameter_updates
/camera/rgb/camera_info
/camera/rgb/image_raw
/camera/rgb/image_raw/compressed
/camera/rgb/image_raw/compressed/parameter_descriptions
/camera/rgb/image_raw/compressed/parameter_updates
/camera/rgb/image_raw/compressedDepth
/camera/rgb/image_raw/compressedDepth/parameter_descriptions
/camera/rgb/image_raw/compressedDepth/parameter_updates
/camera/rgb/image_raw/theora
/camera/rgb/image_raw/theora/parameter_descriptions
/camera/rgb