ros / geometry

Packages for common geometric calculations including the ROS transform library, "tf". Also includes ROS bindings for "bullet" physics engine and "kdl" kinematics/dynamics package.
173 stars 274 forks source link

the python listner cannot get the exist transform #162

Closed bringBackm closed 6 years ago

bringBackm commented 6 years ago

Hi all, today l find one strange thing when l use tf(python) to get the transform published by my cpp node. 2018-04-20 21-33-10 then l use python tf 2018-04-20 21-33-58 well, some error happens 2018-04-20 21-34-59 However, if l use the cpp node listener , it works. 2018-04-20 21-37-47

;( seems strange and no idea what's wrong l am under Ubuntu 16.04, ROS Kinetic

bringBackm commented 6 years ago

2018-04-20 21-42-38 l run rqt_tf_tree to look what happens, and picture tells.

tfoote commented 6 years ago

Please ask questions on http://answers.ros.org according to our support policy: http://wiki.ros.org/Support We try to keep the issue tracker reserved for bugs and feature developments.

Also mentioned there, please don't use screenshots of text. They can't be searched or reproduced easily. Copy and paste them instead and use code blocks.

Your problem is that you're not giving the buffer any time to populate before querying it. You'll find there are already many similar questions on answers.ros.org with this same problem. Please search there for other releated questions. And see part 3 of this about try blocks: http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20listener%20%28C%2B%2B%29 or here: http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20listener%20%28Python%29