autoware.universe icon indicating copy to clipboard operation
autoware.universe copied to clipboard

feat(autonomous_emergency_braking): add obstacle velocity estimation for AEB

Open danielsanchezaran opened this issue 9 months ago • 0 comments

Description

This PR introduces obstacle velocity estimation to the AEB module. Currently, the AEB module uses RSS distance to determine if a collision between ego and the obstacle will collide or not, but the object speed is set to 0 by default. This sometimes causes the ego vehicle to issue a stop when it gets close to an object in front that is moving forward.

This PR uses detected object history and the change of object position between point cloud frames to calculate the object's velocity along the ego path's longitudinal axis. Furthermore the velocity is added to a queue of "object velocities" and the median value is chosen as the current object speed (That is done to account for possible jumps of velocity due to false detection).

This calculation is necessary to correctly compute the RSS distance that AEB uses to determine if a collision will happen, currently AEB just assigns 0 as the object speed. This PR fixes that

This PR also adds some sync guard_locks to prevent data races and also does some refactoring.

Related links

Launch required changes: https://github.com/autowarefoundation/autoware_launch/pull/978

Tests performed

PSim

Comparison:

Before: AEB sends an error (emergency stop) when we suddenly place a car running at 10 m/s in front of ego even though the NPC vehicle is moving faster than the ego and the risk of not being able to slow down on time is not there. You can see the error being sent on the rqt_robot_monitor screen

https://github.com/autowarefoundation/autoware.universe/assets/25967964/74acf839-9a41-4adc-9de0-40408409217b

With this PR: same situation, but the AEB module correctly judges the situation to be safe because it calculates the object speed to be around 10 m/s on the longitudinal axis of the ego path and there is no emergency stop issued:

https://github.com/autowarefoundation/autoware.universe/assets/25967964/3432bcda-2498-4026-aae7-16484cfb034c

Notes for reviewers

Requires changes to Launch: https://github.com/autowarefoundation/autoware_launch/pull/978

Interface changes

Effects on system behavior

By estimating object speed, false positive stops will happen less often.

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.

  • [ ] The PR follows the pull request guidelines.
  • [ ] The PR has been properly tested.
  • [ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • [ ] There are no open discussions or they are tracked via tickets.
  • [ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

danielsanchezaran avatar May 01 '24 05:05 danielsanchezaran