Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

tf_echo is correct, yet no result from lookuptranform

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.