Ask Your Question
1

tf_echo is correct, yet no result from lookuptranform

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

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 = rospy.Time.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

Comments

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 -0500 )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 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

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

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
0

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

thompson104 gravatar image

Hey,

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

edit flag offensive delete link more

Comments

Can you elaborate?

jayess gravatar image jayess  ( 2017-09-16 20:52:59 -0500 )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 -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

2 followers

Stats

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

Seen: 281 times

Last updated: Sep 16 '17