Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Costmap2D future robot pose with static_transform_publisher #1048

Closed
pavloblindnology opened this issue Nov 12, 2020 · 0 comments · Fixed by #1066
Closed

Costmap2D future robot pose with static_transform_publisher #1048

pavloblindnology opened this issue Nov 12, 2020 · 0 comments · Fixed by #1066

Comments

@pavloblindnology
Copy link
Contributor

When TF frames are published into the future, e.g. when using static_transform_publisher,
Costmap2D gets future stamped robot pose.
This is because it requests the latest transformation

robot_pose.header.stamp = ros::Time();

This, in turn, can lead local planner to get Extrapolation into the future error when trying to convert the latest robot pose to the frame of the plan (odom->map).

tf.transform(global_pose, robot_pose, plan_pose.header.frame_id);

This is because the latest robot pose has been got using the latest base_link->odom transform, while odom->map may be lagging behind (e.g. if it's also published by static_transform_publisher). And previous transformation of global plan from map to odom is also lagging behind

geometry_msgs::TransformStamped plan_to_global_transform = tf.lookupTransform(global_frame, ros::Time(),

Proposed solution is to try to get robot pose for the current time by Costmap2D, and switch to the latest robot pose only if that is not possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants