Home » Turtlebot3多机建图教程 » Turtlebot3多机建图教程-软硬件

Turtlebot3多机建图教程-软硬件

Turtlebot3多机建图教程-软硬件

说明:

  • 介绍多机的软硬件要求

硬件说明:

  • Burger至少2台
  • 笔记本一台

软件:

  • ubuntu系统16.04 ,ROS版本kinetic
  • OpenCR固件升级到1.2.1 之后的版本 ,OpenCR固件升级参考
  • [Remote PC] 安装多机地图合并软件包ros-kinetic-multirobot-map-merge
$ sudo apt-get install ros-kinetic-multirobot-map-merge
  • [Remote PC] 创建turtlebot3_map_merge.launch和文件
$ roscd turtlebot3_slam/launch/
$ vim turtlebot3_map_merge.launch
//复制以下内容后,保存退出
 <launch>

  <arg name="first_tb3"  default="tb3_0"/>
  <arg name="second_tb3" default="tb3_1"/>

  <arg name="first_tb3_x_pos" default="0.0"/>
  <arg name="first_tb3_y_pos" default="0.0"/>
  <arg name="first_tb3_z_pos" default="0.0"/>
  <arg name="first_tb3_yaw"   default="0.0"/>

  <arg name="second_tb3_x_pos" default="0.0"/>
  <arg name="second_tb3_y_pos" default="0.0"/>
  <arg name="second_tb3_z_pos" default="0.0"/>
  <arg name="second_tb3_yaw"   default="0.0"/>

  <group ns="$(arg first_tb3)/map_merge">
    <param name="init_pose_x"   value="$(arg first_tb3_x_pos)"/>
    <param name="init_pose_y"   value="$(arg first_tb3_y_pos)"/>
    <param name="init_pose_z"   value="$(arg first_tb3_z_pos)"/>
    <param name="init_pose_yaw" value="$(arg first_tb3_yaw)"  />
  </group>

  <group ns="$(arg second_tb3)/map_merge">
    <param name="init_pose_x"   value="$(arg second_tb3_x_pos)"/>
    <param name="init_pose_y"   value="$(arg second_tb3_y_pos)"/>
    <param name="init_pose_z"   value="$(arg second_tb3_z_pos)"/>
    <param name="init_pose_yaw" value="$(arg second_tb3_yaw)"  />
  </group>


  <node pkg="multirobot_map_merge" type="map_merge" respawn="false" name="map_merge" output="screen">
    <param name="robot_map_topic" value="map"/>
    <param name="robot_namespace" value="tb3"/>
    <param name="merged_map_topic" value="map"/>
    <param name="world_frame" value="map"/>
    <param name="known_init_poses" value="true"/>
    <param name="merging_rate" value="0.5"/>
    <param name="discovery_rate" value="0.05"/>
    <param name="estimation_rate" value="0.1"/>
    <param name="estimation_confidence" value="1.0"/>
  </node>

  <node pkg="tf" type="static_transform_publisher" name="world_to_$(arg first_tb3)_tf_broadcaster"  args="0 0 0 0 0 0 /map /$(arg first_tb3)/map 100"/>
  <node pkg="tf" type="static_transform_publisher" name="world_to_$(arg second_tb3)_tf_broadcaster" args="0 0 0 0 0 0 /map /$(arg second_tb3)/map 100"/>

</launch>
  • [Remote PC] 创建multi_turtlebot3_slam.rviz文件
$ roscd turtlebot3_slam/rviz
$ wget https://github.com/ncnynl/turtlebot3_simulations/blob/master/turtlebot3_gazebo/rviz/multi_turtlebot3_slam.rviz

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: turtlebot3多机建图教程