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 a new localization package ar_tag_based_localizer #4347

Conversation

SakodaShintaro
Copy link
Contributor

@SakodaShintaro SakodaShintaro commented Jul 20, 2023

Description

This pull request adds an AR-Tag based self-localization package.

Related links

Tests performed

This new package was evaluated using a specific set of rosbag, pcd_map, and lanelet2_map.

test data

For the protection of personal information, the image data in the sample data is blurred except for AR-Tags.

In summary, to compare with NDT,

Condition Mean Error (m)
Twist Only 0.729
Twist + AR-Tag Based Localizer 0.433

The table shows that using the AR-Tag Based Localizer enables more accurate self-position estimation than using only twist in ekf_localizer.
The results with the AR-Tag Based Localizer also have a large discrepancy compared to the NDT, but this is thought to be due to the lack of IMU data in the rosbag data.

Notes for reviewers

Please refer to the README.md for more details about ar_tag_based_localizer package.

Interface changes

There are no interface changes other than the added packages.

Effects on system behavior

The AR-Tag Based Localizer node will not start unless the arguments are changed. In other words, it does not affect the default Autoware behavior.

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.

Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
@SakodaShintaro SakodaShintaro added the component:localization Vehicle's position determination in its environment. (auto-assigned) label Jul 20, 2023
@SakodaShintaro SakodaShintaro self-assigned this Jul 20, 2023
@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:launch Launch files, scripts and initialization tools. (auto-assigned) labels Jul 20, 2023
@KYabuuchi
Copy link
Contributor

FYI. I added aruco into the dictionary. tier4/autoware-spell-check-dict#575

SakodaShintaro and others added 5 commits July 24, 2023 09:35
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>
@SakodaShintaro SakodaShintaro marked this pull request as ready for review July 24, 2023 03:59
@SakodaShintaro
Copy link
Contributor Author

The spell-check-differential is still failing, but it is not related to the package added in this PR.

@SakodaShintaro SakodaShintaro added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jul 24, 2023
Copy link
Contributor

@kminoda kminoda left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!
Before running it on my local PC, let me give some comments 🙏

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
@SakodaShintaro SakodaShintaro removed the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jul 24, 2023
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>
pre-commit-ci bot and others added 20 commits August 3, 2023 06:17
….yaml


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

Co-authored-by: kminoda <44218668+kminoda@users.noreply.github.com>
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>
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.02% 🎉

Comparison is base (5dfa9d2) 14.84% compared to head (8f8855c) 14.87%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4347      +/-   ##
==========================================
+ Coverage   14.84%   14.87%   +0.02%     
==========================================
  Files        1521     1520       -1     
  Lines      105265   104831     -434     
  Branches    32043    31792     -251     
==========================================
- Hits        15629    15592      -37     
+ Misses      72566    72197     -369     
+ Partials    17070    17042      -28     
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 14.90% <ø> (+0.05%) ⬆️ Carriedforward from c462e41

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

Files Changed Coverage Δ
...ased_localizer/src/ar_tag_based_localizer_core.cpp 0.00% <0.00%> (ø)
...ased_localizer/src/ar_tag_based_localizer_node.cpp 0.00% <0.00%> (ø)
.../ar_tag_based_localizer/src/tag_tf_caster_core.cpp 0.00% <0.00%> (ø)
.../ar_tag_based_localizer/src/tag_tf_caster_node.cpp 0.00% <0.00%> (ø)
localization/ar_tag_based_localizer/src/utils.cpp 0.00% <0.00%> (ø)
planning/behavior_path_planner/src/utils/utils.cpp 15.28% <ø> (-0.34%) ⬇️

... and 34 files with indirect coverage changes

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

Copy link
Contributor

@KYabuuchi KYabuuchi left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@kminoda kminoda left a comment

Choose a reason for hiding this comment

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

LGTM!

@SakodaShintaro SakodaShintaro merged commit 2f44d6d into autowarefoundation:main Aug 7, 2023
24 of 26 checks passed
@SakodaShintaro SakodaShintaro deleted the feat/add_ar_tag_based_localizer branch August 7, 2023 08:14
LeoDriveProject pushed a commit to leo-drive/autoware.universe.golf that referenced this pull request Aug 16, 2023
…lizer` (autowarefoundation#4347)

* Added ar_tag_based_localizer

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

* style(pre-commit): autofix

* Added include

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

* Fixed typo

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

* style(pre-commit): autofix

* Added comment

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

* Updated license statements

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

* Updated default topic names

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

* Replaced "_2_" to "_to_"

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

* Fixed tf_listener_ shared_ptr to unique_ptr

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

* Removed unused get_transform

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

* Fixed alt text

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

* Fixed topic name

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

* Fixed default topic name of tag_tf_caster

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

* Fixed AR Tag Based Localizer to work independently

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

* Added principle

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

* Fixed how to launch

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

* Added link to sample data

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

* Added sample_result.png

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

* Update localization/ar_tag_based_localizer/README.md

Co-authored-by: kminoda <44218668+kminoda@users.noreply.github.com>

* Update localization/ar_tag_based_localizer/README.md

Co-authored-by: kminoda <44218668+kminoda@users.noreply.github.com>

* Fixed LaneLet2 to Lanelet2

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

* style(pre-commit): autofix

* Update localization/ar_tag_based_localizer/src/ar_tag_based_localizer_core.cpp

Co-authored-by: kminoda <44218668+kminoda@users.noreply.github.com>

* style(pre-commit): autofix

* Update localization/ar_tag_based_localizer/config/tag_tf_caster.param.yaml

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

Co-authored-by: kminoda <44218668+kminoda@users.noreply.github.com>

* Added unit to range parameter

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

* Removed std::pow

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

* Removed marker_size_ != -1

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

* Fixed maintainer

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

* Added ar_tag_based_localizer to tier4_localization_launch/package.xml

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

* style(pre-commit): autofix

* Fixed legend of node_diagram

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

* style(pre-commit): autofix

* Renamed range to distance_threshold

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

* Fixed topic names in README.md

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

* Fixed parameter input

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

* Removed right_to_left_

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

* Added namespace ar_tag_based_localizer

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

* Updated inputs/outputs

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

* Fixed covariance

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

* style(pre-commit): autofix

* Added principle of tag_tf_caster

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

* Removed ament_lint_auto

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

* Fixed launch name

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>
Co-authored-by: kminoda <44218668+kminoda@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) tag: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.

3 participants