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

feat(localization): add pose_instability_detector #5439

Conversation

SakodaShintaro
Copy link
Contributor

@SakodaShintaro SakodaShintaro commented Oct 30, 2023

Description

Added pose_instability_detector node.

See README.md for details.

A known problem is that the amount of data published to /diagnostics in the current autoware is too large and can cause it to drop some data.

Tests performed

The following tests have been run and verified

  • run autoware on sample rosbag
  • run autoware on AWSIM's rosbag and the error between ekf and GT is the same as before.
  • colcon test
# if use lcov, need following libraries
# sudo apt-get install -y lcov python3-colcon-lcov-result

colcon build --symlink-install \
  --cmake-args \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_TESTING=ON \
    -DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' \
    -DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage' \
  --packages-select pose_instability_detector
colcon test --return-code-on-test-failure --packages-select pose_instability_detector
colcon lcov-result --packages-select pose_instability_detector
colcon test-result --all --verbose | grep pose_instability_detector

A directory named lcov will be created under ~/autoware, where coverage can be checked.

Result

The following results are obtained when run in AWSIM's rosbag.

diff_pose

Effects on system behavior

An output to check the stability of the EKF output values will be added to the diagnostics.

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>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) component:launch Launch files, scripts and initialization tools. (auto-assigned) labels Oct 30, 2023
SakodaShintaro and others added 4 commits October 31, 2023 13:52
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
@YamatoAndo
Copy link
Contributor

@SakodaShintaro Please update the rqt_runtime_monitor.png to its latest state just before merging.

@SakodaShintaro SakodaShintaro removed the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 1, 2023
SakodaShintaro and others added 10 commits November 1, 2023 10:25
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
difference in PoseInstabilityDetector

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
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 Nov 2, 2023
@Motsu-san Motsu-san self-requested a review November 10, 2023 05:38
Copy link
Contributor

@Motsu-san Motsu-san left a comment

Choose a reason for hiding this comment

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

LGTMeow

@SakodaShintaro
Copy link
Contributor Author

@KYabuuchi @YamatoAndo

Thank you for comments.
Have all the problems been resolved?

It seems that there is a change to launch, so it cannot be merged without the approve of the person who has the authority to do so.
The algorithm of the code has already been reviewed by Sakamoto-san.

@SakodaShintaro SakodaShintaro merged commit 765a596 into autowarefoundation:main Nov 15, 2023
@SakodaShintaro SakodaShintaro deleted the feat/add_pose_instability_detector branch November 15, 2023 00:08
takayuki5168 pushed a commit to tier4/autoware.universe that referenced this pull request Nov 22, 2023
…on#5439)

* Added pose_instability_detector

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Renamed files

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed parameter name

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed to launch

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed to run normally

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed to publish diagnostics

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed a variable name

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed Copyright

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Added test

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Added maintainer

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Added maintainer

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Removed log output

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Modified test

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed comment

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Added a test case

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Added set_first_odometry_

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Refactored test

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed test

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed topic name

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed position

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Added twist message2

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed launch

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Updated README.md

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* style(pre-commit): autofix

* Fixed as pointed out by clang-tidy

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Renamed parameters

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed timer

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed README.md

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Added debug publishers

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed parameters

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* style(pre-commit): autofix

* Fixed tests

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Changed the type of ekf_to_odom and add const

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Fixed DiagnosticStatus

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Changed odometry_data to std::optional

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Refactored debug output in pose instability detector

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* style(pre-commit): autofix

* Remove warning message for negative time
difference in PoseInstabilityDetector

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>

* Updated rqt_runtime_monitor.png

Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>

---------

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:launch Launch files, scripts and initialization tools. (auto-assigned) 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) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants