How to use transformListener to lookup very early Transform?
Now I have a .bag
file,which contains some transform
.
Q:I want use tf.listener.lookupTransform() to get transform,but it throws exception
Requested time 976052877.783882021 but the earliest data is at time 1533652658.077350788,.....
I read the reference of listener.lookupTransform()
,ros::Time(0)
means use current time.
So,what can I do to get the history Transform?
My code:
try
{
_tf_listener.waitForTransform(_base_frame, _map_frame,
ros::Time(0), ros::Duration(10.0) );
_tf_listener.lookupTransform(_base_frame,_map_frame,
ros::Time(0),_map_to_base);
}
catch(tf::TransformException te)
{
ROS_ERROR("%s",te.what());
ros::Duration(1.0).sleep();
continue;
}
...