Fix Smac2D final pose to match reached goal#6270
Conversation
|
I believe the reason we have this issue is that SmacPlanner2D converts the requested goal from world coordinates into continuous map coordinates, but the A* search itself operates on discrete costmap cell indices. Once the planner reaches the goal cell, the path is backtraced from integer node indices and then converted back to world coordinates, so the fractional offset of the requested goal inside that cell is lost. As a result, even though the planner correctly reached the goal cell, the final returned path pose can differ from the requested goal pose by some fraction of the map resolution. This change restores the original requested goal position only when the returned path actually ends in the requested goal cell. |
SteveMacenski
left a comment
There was a problem hiding this comment.
Please fix the CI reported failures below, otherwise LGTM
879c8b3 to
4fe6db5
Compare
|
It looks like a change in the tf2_ros::CreateTimerROS API in ROS 2 Rolling caused the ci/circleci: core_build fail in the nav2_util package. |
SteveMacenski
left a comment
There was a problem hiding this comment.
I'm in the middle of fixing CI (#6281). Once that's good, I'll ping you back here to rebase/pull in so CI turns over. Otherwise LGTM assuming your PR works at that point!
|
Tick the box to add this pull request to the merge queue (same as
|
|
Merging that PR imminently, check that its been merged, rebase/pull in main and I can merge if CI passes for your work! |
Signed-off-by: Nguyen Thanh Tai <nexoncolors@gmail.com>
Signed-off-by: Nguyen Thanh Tai <nexoncolors@gmail.com>
4fe6db5 to
9e89d94
Compare
|
@SteveMacenski, It looks like the ci/circleci: algorithm_build was failed because it hit the execution time limit. Do you have a way to handle this ? |
Basic Info
Description of contribution in a few bullet points
SmacPlanner2Dto return the requested goal position as the final path pose when the search reaches the goal cell.use_final_approach_orientationbehavior.Description of documentation updates required from your changes
Description of how this change was tested
ComputePathToPoseaction usingSmacPlanner2Dwith this configuration:Future work that may be required in bullet points
For Maintainers: