How to resolve waitForTransform timeout exception regardless of Duration value in ROS Kinetic (python)?
I have gone through similar questions on this website, but none have helped resolve the problem for me.
listener.waitForTransform("world", "camera_link", rospy.Time(0), rospy.Duration(4.0))
- My TF tree is well defined and shows the connection between the two frames (world and a camera frame). It's World -> Link 1 -> Link 2 -> Camera Link I check this based on rqt-graph.
- If I replace "world" above with "Link 2" I don't get the timeout exception, which is interesting.
- As I mentioned, changing Duration doesn't help.
- The
use_sim_time
parameter is also defined and set to True.
Not sure how to proceed on this at all.
Something which might be important -
I am working through VMWare. Due to some issue with vmware tools, I had to run the sudo apt-get autoremove
command. Which, unfortunately, ended up removing some of the ROS packages. So I am thinking that might be related to this problem, but I can't be sure. I have tried reinstalling the tf, tf2, geometry packages till now becacuse some posts suggested it to be a problem related to those. Didn't help.
Any idea on how to debug/solve this? I can provide more information if required.
Update:
Just after posting this, I tried to run tf_echo
for those two. And I get this error -
Exception thrown:Could not find a connection between 'camera_link' and 'world' because they are not part of the same tree.Tf has two or more unconnected trees.
Which is weird and interesting because this seems to contradict the first point I have above.