< >
Home » Turtlebot3多机建图教程 » Turtlebot3多机建图教程-多机测试

Turtlebot3多机建图教程-多机测试

Turtlebot3多机建图教程-多机测试

说明:

  • 介绍如何执行多机测试

相关设备:

步骤:

  • [Remote PC] 启动rosore
$ roscore 
  • [TurtleBot] 启动第一台小车
$ ROS_NAMESPACE=tb3_0 roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="tb3_0" set_lidar_frame_id:="tb3_0/base_scan"
  • [TurtleBot] 启动第二台小车
$ ROS_NAMESPACE=tb3_1 roslaunch turtlebot3_bringup turtlebot3_robot.launch multi_robot_name:="tb3_1" set_lidar_frame_id:="tb3_1/base_scan"
  • 效果如下:
PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /tb3_0/turtlebot3_core/baud: 115200
 * /tb3_0/turtlebot3_core/port: /dev/ttyACM0
 * /tb3_0/turtlebot3_core/tf_prefix: tb3_0
 * /tb3_0/turtlebot3_lds/frame_id: tb3_0/base_scan
 * /tb3_0/turtlebot3_lds/port: /dev/ttyUSB0

NODES
  /tb3_0/
    turtlebot3_core (rosserial_python/serial_node.py)
    turtlebot3_diagnostics (turtlebot3_bringup/turtlebot3_diagnostics)
    turtlebot3_lds (hls_lfcd_lds_driver/hlds_laser_publisher)

auto-starting new master
process[master]: started with pid [3994]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to fa9d12f8-f473-11e8-9406-b827eb32fb28
process[rosout-1]: started with pid [4007]
started core service [/rosout]
process[tb3_0/turtlebot3_core-2]: started with pid [4010]
process[tb3_0/turtlebot3_lds-3]: started with pid [4011]
process[tb3_0/turtlebot3_diagnostics-4]: started with pid [4018]
[INFO] [1543563964.570213]: ROS Serial Python Node
[INFO] [1543563964.589611]: Connecting to /dev/ttyACM0 at 115200 baud
[INFO] [1543563966.730803]: Note: publish buffer size is 1024 bytes
[INFO] [1543563966.733386]: Setup publisher on sensor_state [turtlebot3_msgs/SensorState]
[INFO] [1543563966.748624]: Setup publisher on firmware_version [turtlebot3_msgs/VersionInfo]
[INFO] [1543563966.889800]: Setup publisher on imu [sensor_msgs/Imu]
[INFO] [1543563966.898826]: Setup publisher on cmd_vel_rc100 [geometry_msgs/Twist]
[INFO] [1543563966.935220]: Setup publisher on odom [nav_msgs/Odometry]
[INFO] [1543563966.943563]: Setup publisher on joint_states [sensor_msgs/JointState]
[INFO] [1543563966.951973]: Setup publisher on battery_state [sensor_msgs/BatteryState]
[INFO] [1543563966.960770]: Setup publisher on magnetic_field [sensor_msgs/MagneticField]
[INFO] [1543563969.932662]: Setup publisher on /tf [tf/tfMessage]
[INFO] [1543563969.945057]: Note: subscribe buffer size is 1024 bytes
[INFO] [1543563969.946416]: Setup subscriber on cmd_vel [geometry_msgs/Twist]
[INFO] [1543563969.958546]: Setup subscriber on sound [turtlebot3_msgs/Sound]
[INFO] [1543563969.971224]: Setup subscriber on motor_power [std_msgs/Bool]
[INFO] [1543563969.983424]: Setup subscriber on reset [std_msgs/Empty]
[INFO] [1543563969.994477]: Setup TF on Odometry [tb3_0/odom]
[INFO] [1543563969.997389]: Setup TF on IMU [tb3_0/imu_link]
[INFO] [1543563970.000370]: Setup TF on MagneticField [tb3_0/mag_link]
[INFO] [1543563970.003407]: Setup TF on JointState [tb3_0/base_link]
[INFO] [1543563970.019651]: --------------------------
[INFO] [1543563970.022673]: Connected to OpenCR board!
[INFO] [1543563970.025644]: This core(v1.2.3) is compatible with TB3 Burger
[INFO] [1543563970.028551]: --------------------------
[INFO] [1543563970.031355]: Start Calibration of Gyro
[INFO] [1543563972.559972]: Calibration End
  • [Remote PC] 启动第一台小车模型
$ ROS_NAMESPACE=tb3_0 roslaunch turtlebot3_bringup turtlebot3_remote.launch multi_robot_name:=tb3_0
  • [Remote PC] 启动第二台小车模型
 $ ROS_NAMESPACE=tb3_1 roslaunch turtlebot3_bringup turtlebot3_remote.launch multi_robot_name:=tb3_1
  • 打开rqt查看tf树和话题

请输入图片描述

FAQ

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

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


标签: turtlebot3多机建图教程