Ask Your Question
0

static_transform_publisher broadcast wrong transfomation [closed]

asked 2021-06-04 11:48:05 -0500

bach gravatar image

updated 2021-06-04 11:49:29 -0500

Hi,

what is happening is really insane to me. I have set up two static broadcaster in my launch file:

<node pkg="tf" type="static_transform_publisher" name="my_broadcaster1" args="11.0 11.0 0 0 0 0 1 world odom 30" />

<node pkg="tf" type="static_transform_publisher" name="my_broadcaster2" args="10.0 10.0 0 0 0 0 1 world room 30" />

But my_broadcaster1 broadcast a transform between map and odom in place of world and odom. This is the tf_tree:

image description

I really don't understand. If I don't launch the navigation stack, all works fine.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by bach
close date 2021-06-05 02:50:08.564078

1 Answer

Sort by » oldest newest most voted
1

answered 2021-06-04 12:11:34 -0500

djchopp gravatar image

updated 2021-06-04 12:28:20 -0500

I believe the issue is my_broadcaster1 is publishing a transform from world->odom while there is also a map->odom transform. That means odom would have 2 parent frames. See this question.

Essentially you cannot have multiple parent transforms for a link. The usual solution is to invert one of the transforms. In this case try switching my_broadcaster1 to publish odom->world instead of world->odom.

EDIT: Sorry, just looked a bit closer. Did you previously have my_broadcaster1 publishing a map->odom transform? If so, this may be a remnant of the old broadcaster. This can happen if you leave a roscore running in between launch changes. Try killing all ros related processes and relaunch. Another issue could be that you have another my_broadcaster1 in your launchfile. There should some error output in the terminal if this is the issue. You can try adding a required="true" tag to that node so the launchfile exits on a failure of this node.

Hope this helps!

edit flag offensive delete link more

Comments

I think you hit the point: there was a problem with multiple parents. I delete the map server which broadcast map->odom transform and now it seems ok. Thank you!

bach gravatar image bach  ( 2021-06-05 02:49:34 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-06-04 11:48:05 -0500

Seen: 34 times

Last updated: Jun 04 '21