[ros-users] problem using tf within navstack localplanner pl…

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
+ wplocplan.tar (application/x-tar)
Slet denne besked
Besvar denne besked
Skribent: User discussions
Dato:  
Til: User discussions
Emne: [ros-users] problem using tf within navstack localplanner plugin
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.