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

tf_prefix and tf2_web_republisher (URDF visualization in browser)

asked 2016-07-18 08:51:38 -0600

jbb gravatar image

Hello everybody !

I have manage to display my custom urdf file in my browser by using this tutorial.

However, when I run what I've done alongside my actual robot (or simulation), the visualization does not display properly (several parts of the robot are displayed at the same point). I am guessing the problems comes from an interference between the tf tree of my robot and the tf tree of my visualization. (These two trees have some links in common but are different).

I tried adding a "tf_prefix" parameter to my robot_state_publisher by doing this

<node name="robot_state_publisher_web" pkg="robot_state_publisher" type="state_publisher">
         <rosparam param="tf_prefix">"visualisation"</rosparam>
  </node>

But when I launch everything I get the following error :

[ERROR] [1468848677.857789028]: "Link1" passed to lookupTransform argument source_frame does not exist.

Where Link1 is a link listed in my URDF file.

Am I using the tf_prefix wrong? Did I not configure something? Should I load my URDF file in a special way ? I also read that tf_prefix doesn't work with all the packages. Is this the case with tf2_web_republisher?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-17 09:52:18 -0600

T045T gravatar image

First off: tf_prefix has been not-really-supported for a long time. It's much safer to expect it to not work at all.

Now that that's out of the way, it sounds like there's something wrong with your tf trees, or maybe the fixed frame of your ros3djs visualization.

Have you looked at the output of

$ rosrun tf view_frames

to see if there are any unconnected parts?

If everything's properly connected, check that your TFClient has a fixedFrame that is actually part of the tree.

edit flag offensive delete link more

Comments

While tf_prefix has been "deprecated" for years, it still fills a need, and there is really no ROS1 alternative. So, I expect it will remain in effect for ROS1. How things will work in ROS2 remains to be seen.

joq gravatar image joq  ( 2017-02-17 10:18:48 -0600 )edit

I thought tf_prefix, the feature of the tf system, was adequately emulated with URDF parameters. Sure, it's a bit clunky, but at least it works with all packages. Is there something I'm missing?

T045T gravatar image T045T  ( 2017-02-17 10:38:09 -0600 )edit

It's useful for multi-robot systems.

joq gravatar image joq  ( 2017-02-17 11:36:24 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-07-18 08:51:38 -0600

Seen: 919 times

Last updated: Feb 17 '17