ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

tf_echo is correct, yet no result from lookuptranform

asked 2017-07-04 20:03:29 -0600

thompson104 gravatar image

Hey guys,

I'm using urdf withrviz to do forward kinematics related problem. My question is can we get the results of tf_echo in a script? Also, I'm looking for suggestions why this problem happened.

I could use

rosrun tf tf_echo /base /tool0

to get the correct result:

At time 1499215724.972 - Translation: [0.410, 0.191, 0.947] - Rotation: in Quaternion [0.707, 0.000, -0.000, 0.707] in RPY (radian) [1.571, 0.000, 0.000] in RPY (degree) [89.997, 0.008, 0.004]

Yet, I couldn't use

(trans, rot) = listener.lookupTransform('base', 'tool0', rospy.Time(0)), refer to here to get the transform, it would throw an exception.

I also tried

now =

listener.waitForTransform("base", "tool0", now, rospy.Duration(10.0)) tf.Exception: . canTransform returned after 10.0023 timeout was 10.

I chagned 10 here to 0.01, 1, etc. and it always gives similar exception.

edit retag flag offensive close merge delete


I am having the exact same issue. using tf2 didnt help. Did you solve it ?

surajmshanbhag gravatar image surajmshanbhag  ( 2017-09-16 18:09:39 -0600 )edit

Yes actually, I followed the tutorial in TF2 and it solved my question, you get the same error?

thompson104 gravatar image thompson104  ( 2017-10-31 11:46:16 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-09-16 19:15:43 -0600

surajmshanbhag gravatar image

I had a local scope for the buffer which made it fail. In the tutorials its mentioned "The TransformListener object should be scoped to persist otherwise it's cache will be unable to fill and almost every query will fail". This fixed the issue.

edit flag offensive delete link more

answered 2017-07-04 20:23:28 -0600

thompson104 gravatar image


I just solved this problem. If you happen to run into this problem, try to use tf2.

edit flag offensive delete link more


Can you elaborate?

jayess gravatar image jayess  ( 2017-09-16 20:52:59 -0600 )edit

I just followed the tutorial of TF2 and it solved my problem. But apparently it doesn't work for everyone, did you get the same error?

thompson104 gravatar image thompson104  ( 2017-10-31 11:46:56 -0600 )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



Asked: 2017-07-04 20:03:29 -0600

Seen: 501 times

Last updated: Sep 16 '17