Ask Your Question
0

Omit branches from the tf tree

asked 2019-07-09 04:34:23 -0500

thanasis_t gravatar image

Hello,

using a URDF, the robot_state_publisher constructs the tf tree which is published in the relative topic. Is there any way to choose which branches of the tf tree are being published without modifying the URDF? For example using some argument in the launch file from where we invoke the robot_state_publisher which specifies that some transformations won't be published? Thanks in advance!!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-09 04:59:03 -0500

gvdhoorn gravatar image

Is there any way to choose which branches of the tf tree are being published without modifying the URDF? For example using some argument in the launch file from where we invoke the robot_state_publisher which specifies that some transformations won't be published?

No, there is no support for this.

Or at least: not in the standard (ie: "official") robot_state_publisher node.

Everything in the urdf stored in the robot_description parameter will be considered by the robot_state_publisher.

edit flag offensive delete link more

Comments

It would perhaps be good if you could describe why you want to do this (just so we avoid an xy-problem).

A possible work-around could be to have multiple robot_description parameters, each containing only a subtree and multiple robot_state_publishers that are responsible for processing only those parts.

gvdhoorn gravatar imagegvdhoorn ( 2019-07-09 05:03:51 -0500 )edit

I am trying to connect two tf trees constructed by two different URDFs. However both URDFs build a frame named "base_link". So when the second tf tree is constructed, the robot_state_publisher finds the "base_link" frame from the first tree and therefore does not construct its own. Hence, I would like to omit the "base_link" frame of the first tf tree and construct only the second one.

thanasis_t gravatar imagethanasis_t ( 2019-07-09 05:10:04 -0500 )edit

It might actually be possible to instead of avoiding publishing certain transforms, they can be removed after the fact by using tf_remapper_cpp.

But again: it would be best to first know why you want to do this.

gvdhoorn gravatar imagegvdhoorn ( 2019-07-09 05:10:24 -0500 )edit

Hence, I would like to omit the "base_link" frame of the first tf tree and construct only the second one.

so just the base_link frame or everything starting with base_link? The "branches" you refer to in your question suggests the latter, but your explanation makes it sound like you'd like to do the former.

I am trying to connect two tf trees constructed by two different URDFs.

are these really urdfs, or .xacros? In the latter case: xacro supports composition, which, with a suitable prefix on all links and joints, would be the normal way to do this. If it's really .urdf, then that would not be possible.

Additionally: is the current contents of robot_description the union of the "two different urdfs" (ie: without actually merging the structures)? Because that is not necessarily supported.

gvdhoorn gravatar imagegvdhoorn ( 2019-07-09 05:12:16 -0500 )edit

The files are not xacros. Sorry about the misunderstanding, I want omit only the "base_link" frame, not the whole branch.

thanasis_t gravatar imagethanasis_t ( 2019-07-09 05:36:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-07-09 04:34:23 -0500

Seen: 9 times

Last updated: Jul 09