yet another tf extrapolation question
This is the piece of code that I have used.
I am trying to transform a geometry_msgs::PointStamped from "base_link" to "map".
geometry_msgs::PointStamped _s , our_s;
_s.point.x = 0.929;
_s.point.y = 0.103672;
_s.point.z = 1.05381;
_s.header.frame_id = "base_link";
_s.header.stamp = ros::Time::now();
tf_l.waitForTransform("map", "base_link", _s.header.stamp, ros::Duration(1.0));
try
{
tf_l.transformPoint("map", _s, our_s);
}
catch(tf::TransformException& ex)
{
ROS_INFO("%s is the exception.", ex.what());
}
This is the same piece of code I always use. I normally get the output right, but now I get: the error
[ INFO] [1409742709.610312612]: Lookup would require extrapolation into the past. Requested time 1409742709.104081534 but the earliest data is at time 1409742709.353810000, when looking up transform from frame [base_link] to frame [map] is the exception.
In this case: rosrun tf_echo view_frames
shows the frames and they are great.
And rosrun tf tf_echo map base_link
gives:
At time 1409742686.330
- Translation: [4.626, -0.504, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.205, 0.979]
in RPY [0.000, 0.000, -0.413]
At time 1409742687.237
- Translation: [4.626, -0.504, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.205, 0.979]
in RPY [0.000, 0.000, -0.413]
At time 1409742688.337
- Translation: [4.626, -0.504, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.205, 0.979]
in RPY [0.000, 0.000, -0.413]
At time 1409742689.247
- Translation: [4.626, -0.504, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.205, 0.979]
in RPY [0.000, 0.000, -0.413]
^CAt time 1409742689.664
- Translation: [4.626, -0.504, 0.000]
- Rotation: in Quaternion [0.000, 0.000, -0.205, 0.979]
in RPY [0.000, 0.000, -0.413]
I have gone through a lot of questions. I still understand this problem correctly. Any help is greatly appreciated.
Thank you so much.
What is the frequency of tf between
[base_link] to [map]
, may be its less than your waiting time 1 second.I get the same result if the duration is increased to 3 seconds