ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Prefix transformations from OpenCR

asked 2018-02-08 19:58:07 -0500

qrfaalnz gravatar image

I am trying to run rrt_exploration on my turtlebot3. I need to prefix all per-robot nodes, topics, and transforms with a per-robot name such as "robot_1". I can do this the usual way for all nodes and topics with <group ns="robot_1"> in my launch file and for almost all transforms with <param name="tf_prefix", value="robot_1"/> in the node that provides the transform.

However, this does not work for transforms that are published by the OpenCR via rosserial_python such as odom. How can I change the name of the transforms published by the rosserial_python node? Re-flashing the openCR is not an option, as this must be extensible to multi-robot systems.

edit retag flag offensive close merge delete



How about adding tf_prefix support to rosserial_python, and only the python on the computer would have to be changed?

lucasw gravatar image lucasw  ( 2018-02-20 20:10:39 -0500 )edit

Hello! Did you ever solve this? Having the same issue and the answers to this question were not correct.

AmateurHour gravatar image AmateurHour  ( 2018-08-01 14:18:49 -0500 )edit

I solved this similarly to @lucasw's comment. Modify rosserial_python to accept a tf_prefix parameter and change Publisher's handlePacket() to add the prefix to child_frame_id and header.frame_id of each tf/tfMessage. Unfortunately I can't post code.

qrfaalnz gravatar image qrfaalnz  ( 2018-08-01 15:00:35 -0500 )edit

Ok! Do you think you could post the code as an answer to my question ?

AmateurHour gravatar image AmateurHour  ( 2018-08-01 15:14:06 -0500 )edit

or could you perhaps elaborate on where to find Publisher's handlePacket()?

AmateurHour gravatar image AmateurHour  ( 2018-08-01 15:29:42 -0500 )edit

That is part of rosserial in Clone rosserial into your catkin_ws and you should be able to search for it. Look at how other parameters are handled.

qrfaalnz gravatar image qrfaalnz  ( 2018-08-01 16:25:49 -0500 )edit

TurtleBot3 supports multi-robot application. This link might be help you

Darby Lim gravatar image Darby Lim  ( 2018-08-01 19:15:23 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2018-03-16 12:40:51 -0500

hasauino gravatar image

The package has been updated, now you don't need namespace prefixing for single robot. There is an example launch file (simple.launch) you can check it out.

edit flag offensive delete link more

answered 2018-02-20 19:49:30 -0500

Gilbert gravatar image

Yes, you can change the topic name.

  1. Add remap in your launch file. I recommend this way. <remap from="original_topic" to="changed_topic_name"/>

  2. Change topic name and update fimware in OpenCR scripts using arduino. Open the OpenCR example -> Turtlebot3 -> Turtlebot3 burger & waffle -> turtlebot3_core. and change topic name in turtlebot3_core_config.h please see :

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-02-08 19:58:07 -0500

Seen: 512 times

Last updated: Mar 16 '18