Skip to content

[EN] Node, Topic and Namespace

CaptainHarlockSSX edited this page Jun 17, 2023 · 1 revision

The Turtlebot has 46 topics, dispatched between the raspberry pi and the create board.

Because we used multiple robots on the same wifi network, we had to use a namespace: The namespace for a given robot should be the same between it's raspberry and its create3

Note that namespace shall not contain -, use _ instead

You can find more information about the constraints of namespaces here here

Changing Namespaces

Rasberry-pi

To update the namespace we used the turtlebot4-setup script (This really only edits the file at /etc/turtlebot/setup.bash )

Create3

The modification of the namespace trough the script should also change the create3 namespace, but you can check using the web interface ip-pi:8080

Namespace

We chose the following namespaces for our robots

/pro_1
/pro_2
/lite_1

Before launching any command, if you machine doesn't have the same namespace as one of the robot, you shall specify it In case of a launch file: ros2 launch something namespace:=/robot_namespace

For a run or any other command: ros2 run package_name package_function --ros-args --remap __ns:=/robot_namespace

⚠️ Be careful with Rviz, it seems like you have to manually reassign each topic name in the left panel

Clone this wiki locally