Lookup would require extrapolation into the past but rqt shows required time is in range.
ubuntu16.04
tf usage
error message:
Lookup would require extrapolation into the past. Requested time 1572576373.995487268 but the earliest data is at time 1572576374.014772881, when looking up transform from frame [base_footprint] to frame [odom]
rqt show:
code is here:
void getTF(const string parent_frame,
const string child_frame,
const ros::Time time_stamp,
tf::StampedTransform& transform){
static tf::TransformListener tf_listener;
try{
tf_listener.waitForTransform(parent_frame, child_frame, time_stamp, ros::Duration(1.0));
tf_listener.lookupTransform(parent_frame, child_frame, time_stamp, transform);
}catch(tf::TransformException ex){
ROS_ERROR("%s",ex.what());
//ros::Duration(1.0).sleep();
}
}
Question:
rqt shows transformation time snapshot between odom and base_footprint is [1572576373.99, 1572576379.38], the required time 1572576373.995487268 should be valid; besides, error message shows the earliest data is at time 1572576374.014772881, why not 1572576373.99 ?
Please do not post screenshots of code. There is no need: it's all text. Copy-paste it into your question and format it properly using the Preformatted Text button (the one with
101010
on it).Please also review the support guidelines, specifically the sections about not posting screenshots.