Skip to content

Conversation

@amock
Copy link
Collaborator

@amock amock commented Dec 15, 2025

This change fixes #94. I tested it with a script that sets poses 1m in front of the robot (in base_footprint frame).

@amock amock requested a review from JustusBraun December 16, 2025 07:03
@JustusBraun
Copy link
Collaborator

When setting the goal pose in the odom frame (after driving around some time to accumulate odom drift) the last pose of the returned plan is not correct:
broken_pose

Copy link
Collaborator

@JustusBraun JustusBraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amock if you agree with the comments I can do the implementation (or let copilot try it :D)


// we shouldn't catch/ignore the error that comes from here, as it indicates a misconfiguration
const geometry_msgs::msg::TransformStamped Tim = tf_buffer.lookupTransform(
mapFrame(), input_pose.header.frame_id, input_pose.header.stamp);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This transform lookup uses a timeout of 0 seconds by default, which will fail immediately if there is latency with the localization e.g. on a real robot. We could either make the timeout configurable using a MeshNav wide parameter every plugin can read, or expose the timeout in the MeshMap::transformToMapFrame method and pass the responsibility to the calling plugin.

{
// This planner requires start and goal pose to be in map frame
const geometry_msgs::msg::PoseStamped start_in_map = mesh_map_->transformToMapFrame(start);
const geometry_msgs::msg::PoseStamped goal_in_map = mesh_map_->transformToMapFrame(goal);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should catch the transform errors here to prevent MeshNav from crashing and return an error code

@JustusBraun
Copy link
Collaborator

Tested it with Ubuntu 24 and ROS Jazzy. Works with proper error msg etc. 👍

@JustusBraun JustusBraun merged commit 9b442d7 into main Dec 16, 2025
2 checks passed
@amock amock deleted the fix/transform-planner branch December 16, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transform goal pose in planner

2 participants