Freespace planner partial trajectory logic may shift turning point in manoeuvers #6026
Open
3 tasks done
Labels
component:planning
Route planning, decision-making, and navigation. (auto-assigned)
status:help-wanted
Assistance or contributors needed.
status:stale
Inactive or outdated issues. (auto-assigned)
type:bug
Software flaws or errors.
Checklist
Description
This is a similar but orthogonal issue to #5988. I think the "index logic" implemented by
getReversingIndices
andgetPartialTrajectory
causes partial trajectories to miss the actual turn point:autoware.universe/planning/freespace_planner/src/freespace_planner/freespace_planner_node.cpp
Lines 88 to 102 in 5de111f
autoware.universe/planning/freespace_planner/src/freespace_planner/freespace_planner_node.cpp
Lines 119 to 141 in 5de111f
If you consider the following example trajectory, going forward then backward:
By the logic of
getPartialTrajectory
, the reversing index is 2 or 3 depending on the the sign of point 3. ThengetPartialTrajectory
extracts point from index 0 to 2 or 3, and override the velocity of the first and last point:Changing the first point velocity is a bit strange here, but I guess it is to handle the case when we are at the turn point and avoid the first point of the partial trajectory being 0.0 (which would keep the vehicle stopped). That said, the current freespace planner implementation generate trajectories with a fixed 5km/s velocity target on all points so the velocity override has no effect in practice (velocity is later refined by
motion_velocity_smoother
)You can see in this case we loose the point that was reaching
x=5.0
. Instead, Autoware would now stop atx=4.0
.One way to avoid this is to reduce the distance between trajectory points, but that means more computation. I think default A* minimum step distance is 0.4 meters, so Autoware may be constantly off by 0.4 meters from turn point.
Another way is to set the turning point on the next index (i.e. the first < 0.0 velocity). However I am afraid this could cause some strange behavior, as the last point of the partial trajectory could end up before the previous point.
I think the proper way to handle this would be to interpolate the turn point instead.
Any suggestion?
Expected behavior
Planned trajectory should be followed precisely
Actual behavior
With the current logic, Autoware may not be able to reach the turn point.
Steps to reproduce
N/A
Versions
No response
Possible causes
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: