Once the settings are confirmed, the script will apply the changes to the Create® 3 and restart the Create® application. This may take about a minute or so. The script will also uninstall the TurtleBot 4 Robot Upstart job, and reinstall it with the new settings. Finally, it will add the ROS_DOMAIN_ID to the
~/.bashrc file of the RPi4. To apply the change to your current RPi4 terminal you will need to call
To manually set the ROS_DOMAIN_ID of the Create® 3, go to the webserver. Navigate to Application->Configuration. Set the Domain ID and click ‘Save'. Then restart the application.
To manually set the ROS_DOMAIN_ID on the RPi4 terminal, simply call
export ROS_DOMAIN_ID=#, replacing
# with your ID number. Note that this will only be applied in your current terminal. To apply this environment variable to all new terminals, add this line to your
RPi4 Robot Upstart Job
To change the ROS_DOMAIN_ID of the TurtleBot 4 Robot Upstart job, you will need to reinstall the job.
First, stop the
sudo systemctl stop turtlebot4.service
Then, uninstall it:
Now you can install it again:
v0.1.3 or higher
install.py <model> --domain #
install.py <model> #
Replace <model> with your TurtleBot 4 model (standard or lite) and # with your ROS_DOMAIN_ID
The ROS_DOMAIN_ID can be set on the User PC in the same way as the RPi4 Terminal.
SSH into your TurtleBot 4 and run the turtlebot4 setup tool:
Navigate to ‘Bash Setup' in the ‘ROS Setup' menu, then change your
ROS_DOMAIN_ID. Save the settings, then apply settings in the main menu.
This will apply the new
ROS_DOMAIN_ID to the Create® 3, RPi4 Terminal, and RPi4 Robot Upstart job.
On the user PC, set the
ROS_DOMAIN_ID in your setup.bash file and source it. See Installing ROS 2 for more details.
Once the Create® 3 application has restarted, try calling
ros2 topic list on both your PC and the RPi4 to ensure that all topics are visible.
Namespacing is a method of adding a prefix to topic names to group certain topics, or to make them unique. By namespacing all topics on a TurtleBot 4, we can have a full set of unique topics for that robot. This allows us to run multiple robots on the same
It is common to use the name of the robot as the namespace. For example, if we have a robot named
robot1, the namespaced topics would look like:
ubuntu@ubuntu:~$ ros2 topic list /parameter_events /robot1/battery_state /robot1/cmd_audio /robot1/cmd_lightring /robot1/cmd_vel /robot1/diagnostics /robot1/dock_status /robot1/function_calls /robot1/hazard_detection /robot1/imu /robot1/interface_buttons /robot1/ip /robot1/ir_intensity /robot1/ir_opcode /robot1/joint_states /robot1/joy /robot1/joy/set_feedback /robot1/kidnap_status /robot1/mobility_monitor/transition_event /robot1/mouse /robot1/odom /robot1/robot_description /robot1/robot_state/transition_event /robot1/scan /robot1/slip_status /robot1/static_transform/transition_event /robot1/stop_status /robot1/tf /robot1/tf_static /robot1/wheel_status /robot1/wheel_ticks /robot1/wheel_vels /rosout
Namespacing is not supported in Galactic.
To set the robot namespace, SSH into your TurtleBot 4 and run the turtlebot4 setup tool:
Navigate to ‘Bash Setup' in the ‘ROS Setup' menu, then change the
ROBOT_NAMESPACE setting. Save the settings, then apply settings in the main menu.
This will apply the new namespace to the Create® 3, RPi4 Terminal, and RPi4 Robot Upstart job.
On the user PC,
turtlebot4_desktop launch files can use a
namespace argument to view a specific robot:
ros2 launch turtlebot4_viz view_model.launch.py namespace:=/robot1