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

ftbmynameis's profile - activity

2020-11-15 15:39:08 -0500 received badge  Famous Question (source)
2020-05-18 08:25:30 -0500 received badge  Notable Question (source)
2020-05-18 08:25:30 -0500 received badge  Popular Question (source)
2019-06-30 00:16:30 -0500 received badge  Famous Question (source)
2019-05-03 06:26:15 -0500 received badge  Notable Question (source)
2019-03-01 02:46:30 -0500 received badge  Self-Learner (source)
2019-03-01 02:46:30 -0500 received badge  Teacher (source)
2019-02-28 04:54:09 -0500 received badge  Popular Question (source)
2019-02-27 13:33:10 -0500 marked best answer Understanding tf lookup extrapolation into the past error

Hi,

I have the quite common issue with tf lookup giving me a "would require extrapolation into the past" error. Since my research didn't yield any results and I the error itself is confusing me a bit, I figured I'd try my luck here. The full error message is:

[ERROR] [1551189860.994610842]: Lookup would require extrapolation into the past.  Requested time 1548847264.576701633 but the earliest data is at time 1551189857.045573652, when looking up transform from frame [camera_rgb_optical_frame] to frame [gpuvoxels_origin]

What confuses me is that the timestamp of the earliest data seems to be beyond the requeste time i.e. in the future not in the past. However tf is telling me it would require a lookup into the past. Is it simply because it only does it's search backwards?

About the error itself: I struggle finding reasons for it since I publish the transform with a static transform publisher with a frequency of 10hz, i.e. I would very much expect for a transform to be available within a reasonable timeframe..

I start my static_transform_publisher like this:

rosrun tf static_transform_publisher 0 0 0 0 0 0 camera_rgb_optical_frame gpuvoxels_origin 100

but I have also tried higher frequencys. The back that publishes my pointcloud data is started WITH the --clock parameter to make use of sim_time.

The callback I am using to react on incoming data and to retrieve the transform is the following:

void callback_tf_transform(const sensor_msgs::PointCloud2::ConstPtr& msg)
{
  std::size_t size = msg->width * msg->height;
  new_points_data.resize(size);

  if (m_tf_listener->waitForTransform(msg->header.frame_id, voxel_point_cloud_frame, ros::Time(0), ros::Duration(5.0), ros::Duration(0.05)))
  {
    // transform new pointcloud to world coordinates
    sensor_msgs::PointCloud2 global_cloud;
    pcl_ros::transformPointCloud(voxel_point_cloud_frame, *msg, global_cloud, *m_tf_listener);

    new_points_data = extract_point_list(global_cloud);
    new_data_received = true;
  }
  else
  {
    ROS_ERROR_STREAM("callback_tf_transform: could not find a transform from '" << msg->header.frame_id << "' to '" << voxel_point_cloud_frame << "' for 5 seconds!");
  }
}

However I am fairly new to ROS and TF so the mistake is probably fairly obvious however I fail to figure it out at the moment and hope someone experience might just see it.

Thanks a lot!

2019-02-27 13:28:30 -0500 answered a question Understanding tf lookup extrapolation into the past error

I have figured out the anwser myself so I hope it may help others in the future. The issue was mainly that I was not us

2019-02-26 08:21:22 -0500 asked a question Understanding tf lookup extrapolation into the past error

Understanding tf lookup extrapolation into the past error Hi, I have the quite common issue with tf lookup giving me a

2019-01-30 05:38:47 -0500 received badge  Enthusiast
2019-01-29 06:41:27 -0500 received badge  Supporter (source)
2019-01-29 06:41:23 -0500 commented answer postprocessing bag with transform node

Thanks for the reply. That already helps a lot. I will try to do it like that and see if it works. Is there an "easy" wa

2019-01-29 06:09:54 -0500 asked a question postprocessing bag with transform node

postprocessing bag with transform node Hi, I have recorded a bag file from a robot (not simulated!) that contains raw s

2019-01-23 10:56:51 -0500 asked a question install turtlebot-simulator fails with unmet dependencies

install turtlebot-simulator fails with unmet dependencies Hi, I try to install the turtlebot-simulator stack to be able