Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(autonomous_emergency_braking): fix no backward imu path and wrong back distance usage #9141

Conversation

danielsanchezaran
Copy link
Contributor

Description

This PR introduces a fix for backwards path generation and collision judgement. It fixes a bug that causes the path length to be negative which makes the AEB NOT generate an IMU path when ego moves in reverse (because ego speed is negative and the length should be always positive). It also makes it so we have to check the ego speed to calculate whatoffset should be used to calculate collisions when moving backwards. These changes only affect backward driving behavior.

Related links

Parent Issue:

  • Link

How was this PR tested?

PSim

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@danielsanchezaran danielsanchezaran marked this pull request as ready for review October 23, 2024 06:58
@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Oct 23, 2024
@danielsanchezaran danielsanchezaran added tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) and removed component:control Vehicle control algorithms and mechanisms. (auto-assigned) labels Oct 23, 2024
Copy link

github-actions bot commented Oct 23, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 28.46%. Comparing base (3711683) to head (2ff5ca6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...autoware_autonomous_emergency_braking/src/node.cpp 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9141      +/-   ##
==========================================
- Coverage   28.46%   28.46%   -0.01%     
==========================================
  Files        1306     1307       +1     
  Lines      101071   101101      +30     
  Branches    39226    39230       +4     
==========================================
+ Hits        28769    28774       +5     
- Misses      69477    69501      +24     
- Partials     2825     2826       +1     
Flag Coverage Δ *Carryforward flag
differential 7.39% <75.00%> (?)
total 28.46% <ø> (-0.01%) ⬇️ Carriedforward from 3711683

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -467,7 +467,9 @@ bool AEB::checkCollision(MarkerArray & debug_markers)
use_pointcloud_data_ && points_belonging_to_cluster_hulls &&
!points_belonging_to_cluster_hulls->empty()) {
const auto current_time = obstacle_ros_pointcloud_ptr_->header.stamp;
getClosestObjectsOnPath(path, current_time, points_belonging_to_cluster_hulls, objects);
const bool ego_moves_forward = current_v > 0.0;
Copy link
Contributor

Choose a reason for hiding this comment

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

@danielsanchezaran
How about using isDrivingForward util function to judge driving forward or not?
If trajectory is not subscribed, then check velocity directly is ok. The concern is velocity estimation's chattering.

Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara left a comment

Choose a reason for hiding this comment

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

LGTM.
Please check my comment about driving direction judge part.

@danielsanchezaran danielsanchezaran force-pushed the fix/account-for-negative-ego-vel-for-imu-path-gen branch from 730dfa6 to 2ff5ca6 Compare October 24, 2024 01:03
@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Oct 24, 2024
@danielsanchezaran
Copy link
Contributor Author

LGTM. Please check my comment about driving direction judge part.

Thank you very much, I added your suggested change and the changes are much simpler and clean!

@danielsanchezaran danielsanchezaran enabled auto-merge (squash) October 24, 2024 01:05
@danielsanchezaran danielsanchezaran merged commit 8e0d40b into autowarefoundation:main Oct 24, 2024
25 of 26 checks passed
@danielsanchezaran danielsanchezaran deleted the fix/account-for-negative-ego-vel-for-imu-path-gen branch October 24, 2024 01:14
danielsanchezaran added a commit to tier4/autoware.universe that referenced this pull request Oct 24, 2024
… back distance usage (autowarefoundation#9141)

* fix no backward imu path and wrong back distance usage

Signed-off-by: Daniel Sanchez <[email protected]>

* use the motion utils isDrivingForward function

Signed-off-by: Daniel Sanchez <[email protected]>

---------

Signed-off-by: Daniel Sanchez <[email protected]>
danielsanchezaran added a commit to tier4/autoware.universe that referenced this pull request Oct 24, 2024
* refactor(autoware_autonomous_emergency_braking): rename info_marker_publisher to virtual_wall_publisher (autowarefoundation#9078)

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix(autonomous_emergency_braking): fix no backward imu path and wrong back distance usage (autowarefoundation#9141)

* fix no backward imu path and wrong back distance usage

Signed-off-by: Daniel Sanchez <[email protected]>

* use the motion utils isDrivingForward function

Signed-off-by: Daniel Sanchez <[email protected]>

---------

Signed-off-by: Daniel Sanchez <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Co-authored-by: Kyoichi Sugahara <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:control Vehicle control algorithms and mechanisms. (auto-assigned) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants