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

Launch setup using tf_prefix broken in hydro

asked 2013-10-04 02:38:44 -0600

updated 2013-10-04 02:55:08 -0600

We used a launch setup like this in groovy:

<node name="ghost_robot_publisher" pkg="robot_state_publisher" type="state_publisher" respawn="true">
  <remap from="robot_description" to="ghost_robot_description" />
  <remap from="joint_states" to="/ghost_robot/joint_states" />
  <param name="tf_prefix" value="/ghost_robot_model"/>

This worked flawlessly in groovy, providing a second robot model in tf, under the "/ghost_robot_model" namespace using the tf_prefix mechanism. With the dropped support of tf_prefix in hydro, everything starts as expected, but unfortunately, the tf data published does not use the namespace anymore, which means that both "normal" and "ghost" robot tf data are published to "normal" tf, resulting in a robot model twitching around as the tf data from both models are fighting each other.

What is the (or a) workaround for this?

edit retag flag offensive close merge delete


tf_prefix support was dropped in hydro? That doesn't sound good. How are multi-robot applications supposed to work?

dornhege gravatar image dornhege  ( 2013-10-04 03:33:01 -0600 )edit

Just checked this: Can you just remove the '/' before the prefix? When you check the raw tf messages and the frame_ids aren't prefixed, I'd assume it's a bug, where robot_state_publisher doesn't call tf::resolve

dornhege gravatar image dornhege  ( 2013-10-04 03:49:32 -0600 )edit

Tried without '/' before prefix, still does not work. Guess I´m gonna open a ticket for robot_state_publisher, unless someone else chimes in in the next hours.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2013-10-04 04:24:38 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2013-10-04 10:13:53 -0600

tfoote gravatar image

Having robot_state_publisher apply the tf_prefix before publishing is the best solution.

edit flag offensive delete link more


I guess so :) So you are suggesting changing robot_state_publisher code (or opening a ticket against it), correct? Asking because I don't see a way to do that using the ROS API.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2013-10-04 22:30:34 -0600 )edit

Yes, it will require a code change to robot_state_publisher to make this happen. This was really the only case successfully covered by tf_prefix before. All the others required implementers to be tf_prefix aware.

tfoote gravatar image tfoote  ( 2013-10-05 21:53:36 -0600 )edit

Question Tools



Asked: 2013-10-04 02:38:44 -0600

Seen: 1,344 times

Last updated: Oct 04 '13