Re: [ros-users] problem using tf within navstack localplanne…

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
+ (text/html)
Slet denne besked
Besvar denne besked
Skribent: User discussions
Dato:  
Til: User discussions
Emne: Re: [ros-users] problem using tf within navstack localplanner plugin
Hi,

sorry for not giving enough code (and sorry for adding a tar which was
intended for a different mail). Thanks for the quick response anyway.

I turns out I struggled with two small defects that I have submitted as

<https://code.ros.org/trac/ros/ticket/3707>
and
<https://code.ros.org/trac/ros-pkg/ticket/5207>

cheers,
Thibault


On 10/13/2011 07:39 PM, Tully Foote wrote:
> 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
> <http://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 <
> <mailto:kruset@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
>      <mailto:ros-users@code.ros.org>
>     https://code.ros.org/mailman/listinfo/ros-users

>
>
>
>
> --
> Tully Foote
> Systems Engineer
> Willow Garage, Inc.
> <mailto:tfoote@willowgarage.com>
> (650) 475-2827
>
>
> _______________________________________________
> ros-users mailing list
>
> https://code.ros.org/mailman/listinfo/ros-users