[ros-users] problem using tf within navstack localplanner plugin

Tully Foote tfoote at willowgarage.com
Thu Oct 13 17:39:11 UTC 2011


Thibault,

The wait for transform is waiting for a transform at time "now" but the
attempted transform is at the time of the header in robot pose.  I would
recommend changing the now to be equal to robot_pose.header.stamp.  I can't
see where those are set in your code block, but likely they are different
times.

PS debugging type questions are better asked on answers.ros.org  it's easier
for others to find similar questions there.

Tully

On Thu, Oct 13, 2011 at 5:05 AM, Thibault Kruse <kruset at in.tum.de> wrote:

> Hi all,
>
> I am using electric lastest ubuntu release for Natty.
>
> I run stage as simulator with map server and amcl.
> $ rosnode list
> /amcl
> /map_server
> /rosout
> /rviz_1318495883909692411
> /stage
>
> The current list of frames is:
> Frame /base_laser_link exists with parent /base_link.
> Frame /base_link exists with parent /base_footprint.
> Frame /base_footprint exists with parent /odom.
> Frame /odom exists with parent /map.
> Frame /map exists with parent NO_PARENT.
>
>
> The following code snippet illustrates my problem:
>
> std::string target_frame = "/map"; //  /odom /base_laser_link;
> listener.waitForTransform("/**base_link", target_frame, now,
> ros::Duration(2.0));
> //wait for inverse transform as well
> //listener.waitForTransform(**target_frame, "/base_link", now,
> ros::Duration(2.0));
> ros::Duration(0.5).sleep();
> listener.transformPose(target_**frame, robot_pose, global_pose);
>
>
> The code above fails with tf::ExtrapolationException
>
> It does not fail if I use target frames odom or /base_laser_link;
> It does not fail if I increase the sleep to 1.0 secs
> It does not fail if I also wait for the inverse transform (though a single
> waitForTransform wont do either way round)
>
> Since this is a very basic setup, I wonder whether I am missing something
> obvious here. Or whether I should file a bug report.
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>


-- 
Tully Foote
Systems Engineer
Willow Garage, Inc.
tfoote at willowgarage.com
(650) 475-2827
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20111013/e8bd87c1/attachment-0004.html>


More information about the ros-users mailing list