Edit on GitHub
Bringup
Run roscore
Run roscore from PC.
[Remote PC]
$ roscore
Bringup TurtleBot3
TIP: Before executing this command, you have to specify the model name of TurtleBot3. The ${TB3_MODEL}
is the name of the model you are using in burger
, waffle
, waffle_pi
.
- Open a new terminal from PC with
Ctrl
+Alt
+T
and connect to Raspberry Pi with its IP address.
The default password is turtlebot.
[Remote PC]$ ssh ubuntu@{IP_ADDRESS_OF_RASPBERRY_PI}
- Bring up basic packages to start TurtleBot3 applications.
[Turtlebot3 SBC]$ export TURTLEBOT3_MODEL=${TB3_MODEL} $ roslaunch turtlebot3_bringup turtlebot3_robot.launch
- If the TurtleBot3 model is
burger
, the terminal will print below messages.
[Turtlebot3 SBC]SUMMARY ======== PARAMETERS * /rosdistro: noetic * /rosversion: 1.15.8 * /turtlebot3_core/baud: 115200 * /turtlebot3_core/port: /dev/ttyACM0 * /turtlebot3_core/tf_prefix: * /turtlebot3_lds/frame_id: base_scan * /turtlebot3_lds/port: /dev/ttyUSB0 NODES / turtlebot3_core (rosserial_python/serial_node.py) turtlebot3_diagnostics (turtlebot3_bringup/turtlebot3_diagnostics) turtlebot3_lds (hls_lfcd_lds_driver/hlds_laser_publisher) ROS_MASTER_URI=http://192.168.1.2:11311 process[turtlebot3_core-1]: started with pid [14198] process[turtlebot3_lds-2]: started with pid [14199] process[turtlebot3_diagnostics-3]: started with pid [14200] [INFO] [1531306690.947198]: ROS Serial Python Node [INFO] [1531306691.000143]: Connecting to /dev/ttyACM0 at 115200 baud [INFO] [1531306693.522019]: Note: publish buffer size is 1024 bytes [INFO] [1531306693.525615]: Setup publisher on sensor_state [turtlebot3_msgs/SensorState] [INFO] [1531306693.544159]: Setup publisher on version_info [turtlebot3_msgs/VersionInfo] [INFO] [1531306693.620722]: Setup publisher on imu [sensor_msgs/Imu] [INFO] [1531306693.642319]: Setup publisher on cmd_vel_rc100 [geometry_msgs/Twist] [INFO] [1531306693.687786]: Setup publisher on odom [nav_msgs/Odometry] [INFO] [1531306693.706260]: Setup publisher on joint_states [sensor_msgs/JointState] [INFO] [1531306693.722754]: Setup publisher on battery_state [sensor_msgs/BatteryState] [INFO] [1531306693.759059]: Setup publisher on magnetic_field [sensor_msgs/MagneticField] [INFO] [1531306695.979057]: Setup publisher on /tf [tf/tfMessage] [INFO] [1531306696.007135]: Note: subscribe buffer size is 1024 bytes [INFO] [1531306696.009083]: Setup subscriber on cmd_vel [geometry_msgs/Twist] [INFO] [1531306696.040047]: Setup subscriber on sound [turtlebot3_msgs/Sound] [INFO] [1531306696.069571]: Setup subscriber on motor_power [std_msgs/Bool] [INFO] [1531306696.096364]: Setup subscriber on reset [std_msgs/Empty] [INFO] [1531306696.390979]: Setup TF on Odometry [odom] [INFO] [1531306696.394314]: Setup TF on IMU [imu_link] [INFO] [1531306696.397498]: Setup TF on MagneticField [mag_link] [INFO] [1531306696.400537]: Setup TF on JointState [base_link] [INFO] [1531306696.407813]: -------------------------- [INFO] [1531306696.411412]: Connected to OpenCR board! [INFO] [1531306696.415140]: This core(v1.2.1) is compatible with TB3 Burger [INFO] [1531306696.418398]: -------------------------- [INFO] [1531306696.421749]: Start Calibration of Gyro [INFO] [1531306698.953226]: Calibration End
Read more about launching RViz
Load TurtleBot3 on Rviz
- Open a new terminal in
Remote PC
and launch the robot state publisher.
[Remote PC]$ roslaunch turtlebot3_bringup turtlebot3_remote.launch
- Open a new terminal and enter the below command to run RViz.
- If you used
apt
for download turtlebot3 package, enter below command.
[Remote PC]$ rosrun rviz rviz -d `rospack find turtlebot3_description`/rviz/model.rviz
- If you used
git clone
for download turtlebot3 package, enter below command. You need to specify the model name of TurtleBot3
[Remote PC]$ rosrun rviz rviz -d `rospack find turtlebot3_description`/rviz/{burger, waffle_pi}.rviz
Bringup
Bringup TurtleBot3
- Open a new terminal from PC with
Ctrl
+Alt
+T
and connect to Raspberry Pi with its IP address.
Enter yourpassword
of Ubuntu OS inRaspberry pi
.
[Remote PC]$ ssh ubuntu@{IP_ADDRESS_OF_RASPBERRY_PI}
- Bring up basic packages to start TurtleBot3 applications. Please use the proper keyword among
burger
,waffle_pi
for theTURTLEBOT3_MODEL
parameter.
[TurtleBot3 SBC]$ export TURTLEBOT3_MODEL=burger $ ros2 launch turtlebot3_bringup robot.launch.py
- When the TURTLEBOT3_MODEL is set to
burger
, the terminal output will look like below.
[TurtleBot3 SBC]$ export TURTLEBOT3_MODEL=burger $ ros2 launch turtlebot3_bringup robot.launch.py [INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2019-08-19-01-24-19-009803-ubuntu-15310 [INFO] [launch]: Default logging verbosity is set to INFO urdf_file_name : turtlebot3_burger.urdf [INFO] [robot_state_publisher-1]: process started with pid [15320] [INFO] [hlds_laser_publisher-2]: process started with pid [15321] [INFO] [turtlebot3_ros-3]: process started with pid [15322] [robot_state_publisher-1] Initialize urdf model from file: /home/ubuntu/turtlebot_ws/install/turtlebot3_description/share/turtlebot3_description/urdf/turtlebot3_burger.urdf [robot_state_publisher-1] Parsing robot urdf xml string. [robot_state_publisher-1] Link base_link had 5 children [robot_state_publisher-1] Link caster_back_link had 0 children [robot_state_publisher-1] Link imu_link had 0 children [robot_state_publisher-1] Link base_scan had 0 children [robot_state_publisher-1] Link wheel_left_link had 0 children [robot_state_publisher-1] Link wheel_right_link had 0 children [robot_state_publisher-1] got segment base_footprint [robot_state_publisher-1] got segment base_link [robot_state_publisher-1] got segment base_scan [robot_state_publisher-1] got segment caster_back_link [robot_state_publisher-1] got segment imu_link [robot_state_publisher-1] got segment wheel_left_link [robot_state_publisher-1] got segment wheel_right_link [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Init TurtleBot3 Node Main [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Init DynamixelSDKWrapper [turtlebot3_ros-3] [INFO] [DynamixelSDKWrapper]: Succeeded to open the port(/dev/ttyACM0)! [turtlebot3_ros-3] [INFO] [DynamixelSDKWrapper]: Succeeded to change the baudrate! [robot_state_publisher-1] Adding fixed segment from base_footprint to base_link [robot_state_publisher-1] Adding fixed segment from base_link to caster_back_link [robot_state_publisher-1] Adding fixed segment from base_link to imu_link [robot_state_publisher-1] Adding fixed segment from base_link to base_scan [robot_state_publisher-1] Adding moving segment from base_link to wheel_left_link [robot_state_publisher-1] Adding moving segment from base_link to wheel_right_link [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Start Calibration of Gyro [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Calibration End [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Motors [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Wheels [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Sensors [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create battery state publisher [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create imu publisher [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create sensor state publisher [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create joint state publisher [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Devices [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create motor power server [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create reset server [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create sound server [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Run! [turtlebot3_ros-3] [INFO] [diff_drive_controller]: Init Odometry [turtlebot3_ros-3] [INFO] [diff_drive_controller]: Run!
- Topics and services can be listed with commands below.
Remote PC
can subscribe topic published byTurtlebot3 SBC
by connecting both in same network environment.- If it doesn’t show operating like below bash, check the below list.
- Check that
Remote PC
andTurtleBot3 SBC
have same ROS_DOMAIN_ID. They must have same ROS_DOMAIN_ID.
[Remote PC],[TurtleBot3 SBC]export ROS_DOMAIN_ID=30
- Check that
Remote PC
andTurtleBot3 SBC
have same RMW(ROS Middleware) implementation.
[Remote PC],[TurtleBot3 SBC]export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- Check that your wifi router supports
multi cast
. If it does, set your router permitmulti cast
. Else try with Hotspot of your phone is recommended.
- List of topics and services may vary depend on ROS pacakage version.
- Topic list
$ ros2 topic list /battery_state /cmd_vel /imu /joint_states /magnetic_field /odom /parameter_events /robot_description /rosout /scan /sensor_state /tf /tf_static
- Service list
$ ros2 service list /diff_drive_controller/describe_parameters /diff_drive_controller/get_parameter_types /diff_drive_controller/get_parameters /diff_drive_controller/list_parameters /diff_drive_controller/set_parameters /diff_drive_controller/set_parameters_atomically /hlds_laser_publisher/describe_parameters /hlds_laser_publisher/get_parameter_types /hlds_laser_publisher/get_parameters /hlds_laser_publisher/list_parameters /hlds_laser_publisher/set_parameters /hlds_laser_publisher/set_parameters_atomically /launch_ros/describe_parameters /launch_ros/get_parameter_types /launch_ros/get_parameters /launch_ros/list_parameters /launch_ros/set_parameters /launch_ros/set_parameters_atomically /motor_power /reset /sound /turtlebot3_node/describe_parameters /turtlebot3_node/get_parameter_types /turtlebot3_node/get_parameters /turtlebot3_node/list_parameters /turtlebot3_node/set_parameters /turtlebot3_node/set_parameters_atomically
- Topic list
Read more about launching RViz
Load TurtleBot3 on Rviz
-
Make sure to bring up the TurtleBot3
-
Open a new terminal and enter the below command to launch RViz.
$ ros2 launch turtlebot3_bringup rviz2.launch.py