fix(freespace_planning_algorithms): fix issue of astar search planner not reaching goal pose #6562
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
closes #5988
The freespace planner output trajectory does not connect to goal pose. It stops before reaching exact pose. Intended behavior is for
base_link
to land on goal pose after completing trajectory.Example image of current planned trajectory not reaching goal (notice incomplete velocity profile to goal):
Reason for Issue
lateral_goal_range: 0.5
andlongitudinal_goal_range: 2.0
search parameters are checked to decide if goal has been found in A* search algorithm (half of above values are checked). The nearest node satisfying this condition is found by astar to become the terminal node. This terminal node thus can have a maximum error of1m
due tolongitudinal_goal_range: 2.0
constraint. Reducing these search parameters would affect goal finding of astar (may lead to no goal found) so an alternate solution is proposed.Proposed solution
Set actual goal pose as final point of trajectory after astar completion so that instead of terminal node of astar, actual goal pose point is reached. The goal pose will always be a valid final point of astar trajectory since it would be within bounds specified by search parameters and would lie on the found trajectory if interpolated within bounds.
Example image of fix (showing goal pose):
Example image of fix (goal pose hidden to show final inserted point):
Video of ego vehicle
base_link
going to goal pose:goalposefix.webm
Tests performed
Fix tested using various goal points in parking lot.
Effects on system behavior
th_arrived_distance_m
parameter also needs to be tuned so that vehicle does not stop earlier in case of some reversing trajectories.longitudinal_goal_range
,th_arrived_distance_m
,lateral_goal_range
should be set wrt to costmap resolution to avoid ealry stopping.Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.