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

TransformListener has unconnected trees

asked 2017-08-08 09:07:57 -0500

bennypi gravatar image

updated 2017-08-08 10:27:43 -0500

I have multiple tf frames which some of are dynamically published by the robot_state_publisher and some are static transformations.

When using the tf.TransformListener i get the error message that there are two or more unconnected trees. Running rosrun tf view_frames also shows the unconnected trees.

However, rosrun rqt_tf_tree rqt_tf_tree shows the correct tf tree, rviz can show the correct tf tree and even rosrun tf tf_echo source_frame destination_frame returns the transformation values.

What am I doing wrong?

EDIT1:

rosrun tf tf_monitor source_frame target_frame returns the correct chain, however every frame is published by "unknown publisher" and the only broadcaster node is called "unknown". Could this be the reason why view_frames or the TransformListener are failing?

EDIT2:

TF2 can do the transformation with the following piece of code:

tf_buffer = tf2_ros.Buffer()
tf2_listener = tf2_ros.TransformListener(tf_buffer)
tf_buffer.lookup_transform('world', 'halcon_camera', rospy.Time())
edit retag flag offensive close merge delete

Comments

I can't be sure, but this sounds like something that could happen with a mixed TF1 / TF2 setup (static transforms, etc). perhaps @tfoote can help here?

gvdhoorn gravatar image gvdhoorn  ( 2017-08-08 10:12:40 -0500 )edit

You could be right because tf2 can do the transformation. I've added this to the question.

bennypi gravatar image bennypi  ( 2017-08-08 10:28:47 -0500 )edit

I don't want to suggest using some workaround when it's not necessary, but can you see whether setting use_tf_static (private param of robot_state_publisher) to False makes things work again? see wiki/robot_state_publisher.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-08 10:40:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-08 13:38:55 -0500

tfoote gravatar image

The python implementation of tf was unable to receive static transforms. This has been resolved in 1.11.9 which is in testing and will become available in the next sync.

Changelog Specifically #149 #134

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-08-08 09:07:57 -0500

Seen: 414 times

Last updated: Aug 08 '17