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(ndt_scan_matcher): added error handling about update_ndt #6560

Conversation

SakodaShintaro
Copy link
Contributor

@SakodaShintaro SakodaShintaro commented Mar 7, 2024

Description

The current ndt_scan_matcher crashes if the initial pose is placed far from the PCD map.

This is because in the case where update_ndt fails, voxel_centroids_ptr_ of ndt remains nullptr and is referenced in subsequent code.

This pull request works around this issue by adding error handling.

Tests performed

It has been confirmed that the logging_simulator runs with the same accuracy as before on AWSIM data with GT.

Effects on system behavior

Placing the initial position estimate far from the PCD no longer causes a crash.

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.

  • There are no open discussions or they are tracked via tickets.

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

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
@SakodaShintaro SakodaShintaro added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 7, 2024
@SakodaShintaro SakodaShintaro self-assigned this Mar 7, 2024
@github-actions github-actions bot added the component:localization Vehicle's position determination in its environment. (auto-assigned) label Mar 7, 2024
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 14.81%. Comparing base (f9dd38c) to head (fb5e2c2).
Report is 2 commits behind head on main.

Files Patch % Lines
...ization/ndt_scan_matcher/src/map_update_module.cpp 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6560      +/-   ##
==========================================
- Coverage   15.19%   14.81%   -0.39%     
==========================================
  Files        1851     1917      +66     
  Lines      128656   132007    +3351     
  Branches    39297    39239      -58     
==========================================
+ Hits        19550    19551       +1     
- Misses      87279    90641    +3362     
+ Partials    21827    21815      -12     
Flag Coverage Δ *Carryforward flag
differential 3.65% <0.00%> (?)
total 14.81% <ø> (-0.39%) ⬇️ Carriedforward from 75f24c4

*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.

Copy link
Contributor

@anhnv3991 anhnv3991 left a comment

Choose a reason for hiding this comment

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

@SakodaShintaro Tested OK on my PC.

@SakodaShintaro SakodaShintaro merged commit 1f6ed4a into autowarefoundation:main Mar 11, 2024
22 of 25 checks passed
@SakodaShintaro SakodaShintaro deleted the fix/add_error_handling_about_update_ndt branch March 11, 2024 01:07
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
Added error handling about update_ndt

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Co-authored-by: Anh Nguyen <anh.nguyen.2@tier4.jp>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
kaigohirao pushed a commit to kaigohirao/autoware.universe that referenced this pull request Mar 22, 2024
…efoundation#6560)

Added error handling about update_ndt

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Co-authored-by: Anh Nguyen <anh.nguyen.2@tier4.jp>
Signed-off-by: kaigohirao <kaigo.hirao@proxima-ai-tech.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…efoundation#6560)

Added error handling about update_ndt

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Co-authored-by: Anh Nguyen <anh.nguyen.2@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:localization Vehicle's position determination in its environment. (auto-assigned) 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