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

Thibault Kruse kruset at in.tum.de
Thu Oct 13 12:05:58 UTC 2011


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wplocplan.tar
Type: application/x-tar
Size: 9074 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20111013/b0b1db72/attachment-0003.tar>


More information about the ros-users mailing list