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: use pose_source and twist_source for selecting localization methods #4257

Merged

Conversation

kminoda
Copy link
Contributor

@kminoda kminoda commented Jul 12, 2023

THIS PR SHOULD BE MERGED AFTER A CERTAIN DISCUSSION IN https://github.com/orgs/autowarefoundation/discussions/3659

Description

Change localization_launch architecture so that we can select localization methods with

  • pose_source: ndt, yabloc, or eagleye
  • twist_source: gyro_odom, or eagleye

You can specify these now like as follow:

$ ros2 launch autoware_launch autoware.launch.xml ... pose_source:=yabloc twist_source:=gyro_odom ...

NOTE: This PR does NOT (and must not) change the performance of any localization mode.

Related links

INTERNAL LINK: https://star4.slack.com/archives/CEL0DR2S2/p1688988460478459

Tests performed

  • For logging simulator:
    • Run with default launch command to verify that it works
    • Run with pose_source:=yabloc with yabloc sample rosbag
    • Run with pose_source:=ndt_scan_matcher twist_source:=eagleye to confirm that eagleye with twist_estimator mode works
    • Run with pose_source:=eagleye twist_source:=eagleye to confirm that eagleye with pose_twist_estimator mode works
  • For planning simulator:
    • Run simple planning simulator and confirmed that it engages and starts driving
    • Run scenario based planning simulation based on a tutorial and confirmed that the vehicle engages and starts driving

Notes for reviewers

Some large modifications have been made in this PR, including:

  • localization_launch directory structure
    • pose_estimator and twist_estimator has been merged into pose_twist_estimator
    • map4_localization_launch has been removed
  • YabLoc
    • Namespace has been modified (/localization/yabloc/... to /localization/pose_estimator/...)

For testing this PR, please use the following dataset:

  • NDT: any data with LiDAR is OK (e.g. sample-map-rosbag)
  • YabLoc: please find the YabLoc sample dataset in this link
  • Eagleye: Sample data is NOT sufficient, so please use some arbitrary longer data, e.g. from JPN TAXI (eagleye takes a lot of time for initialization)

Interface changes

  • Some of the YabLoc internal topic names are modified, but should not have any effect to other packages (No influence when using other pose estimator such as ndt_scan_matcher)

Effects on system behavior

None

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.

kminoda added 8 commits July 7, 2023 10:49
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
…namespace

Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
…nce eval yet)

Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@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 Jul 12, 2023
pre-commit-ci bot and others added 3 commits July 12, 2023 09:24
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.71 ⚠️

Comparison is base (c23e7cd) 15.17% compared to head (76a08a8) 14.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4257      +/-   ##
==========================================
- Coverage   15.17%   14.46%   -0.71%     
==========================================
  Files        1493     1567      +74     
  Lines      102882   107061    +4179     
  Branches    31554    31101     -453     
==========================================
- Hits        15612    15488     -124     
- Misses      70314    74731    +4417     
+ Partials    16956    16842     -114     
Flag Coverage Δ *Carryforward flag
differential 6.17% <ø> (?)
total 14.46% <ø> (-0.71%) ⬇️ Carriedforward from e09b80b

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

see 283 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kminoda kminoda changed the title Feat/add pose twist estimator launch py feat: use pose_source and twist_source for selecting localization methods Jul 12, 2023
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
@KYabuuchi
Copy link
Contributor

For other reviewers, you can find the YabLoc sample dataset in this link 📸

@KYabuuchi
Copy link
Contributor

KYabuuchi commented Jul 13, 2023

I have tested all combinations using logging_simulator.launch.xml.
I found some problems.
( I just checked the behavior and have not seen the code yet. I will let you know if I find those causes. 🏃 )

twist\pose ndt yabloc eagleye INVALID ARG
gyro_odom 🆗 🆗 ⚠️ *1
eagleye 🆗 🆗 ⚠️ *1
INVALID ARG *2 *2 *2 *3

*1, *2 and *3 indicates that pose_estimator, twist_estimator, and both of them are not launched, respectively. It looks good to me.

Issue 1

When pose_source:=eagleye, Perhaps the GNSS topic that pose_initializer is subscribe to has not been properly modified. Therefore, the localization state is transitioning to INITIALIZED before eagleye is initialized.
Conventionally, the topic was remapped as shown in this link.

Issue 2

When pose_source:=eagleye twist_source:=gyro_odom, multiple twist_estimator publishes /localization/twist_estimator/twist_with_covariance. Is this expected behavior?

kminoda added 2 commits July 13, 2023 16:01
…pose/twist relay nodes

Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
@kminoda
Copy link
Contributor Author

kminoda commented Jul 13, 2023

@KYabuuchi Thank you for the comprehensive evaluation! Both points are now fixed: in d289f03 and b0da34a.

@KYabuuchi
Copy link
Contributor

I have confirmed that all estimator combinations work correctly in my environment too. 🎉

Next, I will review the code in more detail. Please wait a bit more.

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.

Please update launch/tier4_localization_launch/README.md, too

@KYabuuchi
Copy link
Contributor

Please add the following packages, which were written in map4_localization_launch, to the package.xml in tier4_localization_launch. 🙏

  <exec_depend>eagleye_fix2pose</exec_depend>
  <exec_depend>eagleye_gnss_converter</exec_depend>
  <exec_depend>eagleye_rt</exec_depend>

kminoda and others added 6 commits July 14, 2023 17:39
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
@kminoda
Copy link
Contributor Author

kminoda commented Jul 14, 2023

@KYabuuchi Thank you! Addressed both part.

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

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

Sorry, I noticed after LGTM. 🙇
The instructions on how to launch yabloc in the /localization/yabloc/README.md is outdated. Could you update it?

Signed-off-by: kminoda <koji.minoda@tier4.jp>
@kminoda
Copy link
Contributor Author

kminoda commented Jul 18, 2023

@KYabuuchi Thank you! Fixed (and confirmed that localization_mode does not exist in Autoware workspace)

Copy link
Contributor

@isamu-takagi isamu-takagi left a comment

Choose a reason for hiding this comment

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

LGTM for pose_initializer

@kminoda kminoda merged commit 3c41d3e into autowarefoundation:main Jul 19, 2023
@kminoda kminoda deleted the feat/add_pose_twist_estimator_launch_py branch August 10, 2023 08:51
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) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants