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