0
$\begingroup$

Rosanswers logo

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())

Originally posted by bennypi on ROS Answers with karma: 48 on 2017-08-08

Post score: 0


Original comments

Comment by gvdhoorn on 2017-08-08:
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?

Comment by bennypi on 2017-08-08:
You could be right because tf2 can do the transformation. I've added this to the question.

Comment by gvdhoorn on 2017-08-08:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by tfoote with karma: 58457 on 2017-08-08

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.