Running multiple Turtlebot3 - adding namespaces (ROS2- Eloquent)

asked 2020-06-24 05:59:23 -0500

EdwinvanEmmerik gravatar image

updated 2020-06-24 06:24:38 -0500

Hi all!

I managed to install ROS2 Eloquent on the turtlebot3 using the ros2 branch from ROBOTIS. However when i try to use this method --> https://zmk5.github.io/general/guide/... to add namespaces to all related topics. The expected output of ros2 topic list would be:

/robot1/battery_state
/robot1/cmd_vel
/robot1/imu
/robot1/joint_states
/robot1/magnetic_field
/robot1/odom
/robot1/parameter_events
/robot1/robot_description
/robot1/rosout
/robot1/scan
/robot1/sensor_state
/robot1/tf
/robot1/tf_static

However the actual output is:

/parameter_events
/robot1/battery_state
/robot1/cmd_vel
/robot1/imu
/robot1/joint_states
/robot1/magnetic_field
/robot1/odom
/robot1/parameter_events
/robot1/robot_description
/robot1/rosout
/robot1/scan
/robot1/sensor_state
/rosout
/tf
/tf_static

I am wondering why remapping topics is so hard in ROS2 and what steps I can take to solve this problem. My goal is to simply start up the robot.launch.py on the Turtlebot3 with a set namespace. So that when I load e.g. 5 Turtlebot3's with different namespaces they can all be monitored by a swarm controller (ultimate goal).

If you have any questions, please let me know.

Best regards, Edwin

edit retag flag offensive close merge delete

Comments

Hey Edwin, thanks for reading the post! One question I have is did you add robot1 as a node_namespace to the turtlebot3_state_publisher.launch.py file?

zmk5 gravatar image zmk5  ( 2020-06-25 09:58:59 -0500 )edit

Hi! Yes I did. If I am correct the /joints_states topic is also remapped within this node. Hence, why I find it strange that the /tf and /tf_static are not. Perhaps it has to do with: https://github.com/ros2/robot_state_p... stating that in ROS Dashing tf_prefix is ignored still (see https://answers.ros.org/question/3345... ). However I am not sure this is also the case in ROS Eloquent.

EdwinvanEmmerik gravatar image EdwinvanEmmerik  ( 2020-06-29 03:00:05 -0500 )edit