Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to use transform 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;
        }
...

How to use transform 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;
        }
...