ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Just a question at this point: if you're Listener has been listening while everything was running, it should still have all the transforms. If you then ask for "the latest" transform (ie: ros::Time(0)) it should still be able to answer your query.

Does that not work for you? Are you using ros::Time::now()?

Just a question at this point: if you're your Listener has been listening while everything was running, it should still have all the transforms. If you then ask for "the latest" transform (ie: ros::Time(0)) it should still be able to answer your query.

Does that not work for you? Are you using ros::Time::now()?

Just a question at this point: if your Listener has been listening while everything was running, it should still have all the transforms. If you then ask for "the latest" transform (ie: ros::Time(0)) it should still be able to answer your query.

Does that not work for you? Are you using ros::Time::now()?


Edit: you might also want to look into the length of the cache for the Listener that you've created. Default is 1 minute I believe. Older TFs will be pruned, and in that case even asking for ros::Time(0) wouldn't work (as the cache would be empty).

Just a question at this point: if your Listener has been listening while everything was running, it should still have all the transforms. If you then ask for "the latest" transform (ie: ros::Time(0)) it should still be able to answer your query.

Does that not work for you? Are you using ros::Time::now()?


Edit: you might also want to look into the length of the cache for the Listener that you've created. Default is 1 minute I believe. Older TFs will be pruned, and in that case even asking for ros::Time(0) wouldn't work (as the cache would be empty).


Edit 2: I don't know about the rest of your code (I'm not sure I would've chosen your approach as it seems to be doing some things I'm not sure are supposed to be even supported in a single process), but I do notice this:

tf_buffer = tf2_ros.Buffer()

You appear to be using the default length for the Buffer (ie: 10 seconds). I cannot deduce whether that is sufficient for your particular use of these APIs. You may want to consider configuring a larger length using the cache_time argument.

The following should create a Buffer with length 60 seconds:

tf_buffer = tf2_ros.Buffer(cache_time=rospy.Duration(60.0))

Just a question at this point: if your Listener has been listening while everything was running, it should still have all the transforms. If you then ask for "the latest" transform (ie: ros::Time(0)) it should still be able to answer your query.

Does that not work for you? Are you using ros::Time::now()?


Edit: you might also want to look into the length of the cache for the Listener that you've created. Default is 1 minute I believe. Older TFs will be pruned, and in that case even asking for ros::Time(0) wouldn't work (as the cache would be empty).


Edit 2: I don't know about the rest of your code (I'm not sure I would've chosen your approach as it seems to be doing some things I'm not sure are supposed to be even supported in a single process), but I do notice this:

tf_buffer = tf2_ros.Buffer()

You appear to be using the default length for the Buffer (ie: 10 seconds). I cannot deduce whether that is sufficient for your particular use of these APIs. You may want to consider configuring a larger length using the cache_time argument.

The following should create a Buffer with length 60 seconds:

tf_buffer = tf2_ros.Buffer(cache_time=rospy.Duration(60.0))

It might also be valuable to see which frames are actually known to the tf_buffer object by calling the all_frames_as_string() method on it.