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(yabloc): add camera and vector map localization #3946

Merged

Conversation

KYabuuchi
Copy link
Contributor

@KYabuuchi KYabuuchi commented Jun 12, 2023

Description

Add YabLoc (localization with camera and vector map) as a new location estimation method.
The user can choose whether to run NDT or YabLoc by specifying localization_mode as an argument when launching autoware.

YabLoc is a pose_estimator consisting of multiple nodes, which estimates position and orientation from sensor inputs and publishes localization/pose_estimator/pose_with_covariance.
image

Packages related to YabLoc are located under localization/yabloc/.
The following figure shows where the code has been changed and added. Red frames indicate edited files, and red blocks indicate added files.
yabloc_autoware_universe_integration-launch_structure(English) drawio

All yabloc-related nodes are launched in the following namespace

/localization/yabloc/image_processing/graph_segment
/localization/yabloc/image_processing/lanelet2_overlay
/localization/yabloc/image_processing/line_segments_overlay
/localization/yabloc/image_processing/lsd
/localization/yabloc/image_processing/segment_filter
/localization/yabloc/image_processing/transform_listener_impl_55bd3a9c5490
/localization/yabloc/image_processing/transform_listener_impl_5604d18c09f0
/localization/yabloc/image_processing/undistort
/localization/yabloc/initializer/camera_pose_initializer_node
/localization/yabloc/initializer/semseg_node
/localization/yabloc/initializer/transform_listener_impl_55fe01887f30
/localization/yabloc/map/ground_server
/localization/yabloc/map/ll2_decomposer
/localization/yabloc/pf/camera_corrector
/localization/yabloc/pf/gnss_corrector

Related links

Tests performed

I confirmed that logging_simulator works correctly with the following ROSBAG created by AWSIM.

  • rosbag : This link is TEIR IV internal link now. I will replace it with publicly available rosbag.
  • rosbag(public) : please decompress after download
  • map : This link was quoted from AWSIM tutorial.

How to launch with NDT

ros2 launch autoware_launch logging_simulator.launch.xml \
  map_path:=$HOME/autoware_map/nishishinjuku \
  vehicle_model:=sample_vehicle \
  sensor_model:=awsim_sensor_kit \
  control:=false \
  planning:=false \
  localization_mode:=lidar  # not necessary because the default mode is lidar

How to launch with YabLoc

ros2 launch autoware_launch logging_simulator.launch.xml \
  map_path:=$HOME/autoware_map/nishishinjuku \
  vehicle_model:=sample_vehicle \
  sensor_model:=awsim_sensor_kit \
  control:=false \
  planning:=false \
  localization_mode:=camera
yabloc_ndt_localizer_selection_para.mp4

⚠️ NOTE: In the video above, ndt and yabloc are specified for localization_mode, but lidar and camera are valid options in the latest version.

Notes for reviewers

This PR needs to be merged with

There is also a PR to autoware-documentation.

Interface changes

Nothing.

Effects on system behavior

By default, it starts as before.
If localization_mode:=camera is added as an argument when launching autoware, YabLoc runs instead of NDT.

When yabloc is used, matching_score, which is NDT's diagnostics, is not published.
Note that the absence of matching_score does not affect the system error monitor.

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: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
@github-actions github-actions bot added the component:common Common packages from the autoware-common repository. (auto-assigned) label Jun 16, 2023
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
@github-actions github-actions bot removed the component:common Common packages from the autoware-common repository. (auto-assigned) label Jun 16, 2023
pre-commit-ci bot and others added 4 commits June 16, 2023 09:15
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch coverage: 4.64% and project coverage change: -9.81 ⚠️

Comparison is base (d5a1ed6) 14.72% compared to head (6e3977f) 4.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #3946       +/-   ##
==========================================
- Coverage   14.72%   4.92%    -9.81%     
==========================================
  Files        1464      69     -1395     
  Lines      103173    2337   -100836     
  Branches    30513     268    -30245     
==========================================
- Hits        15197     115    -15082     
+ Misses      71476    2145    -69331     
+ Partials    16500      77    -16423     
Flag Coverage Δ
differential 4.92% <4.64%> (?)
total ?
Impacted Files Coverage Δ
...zer/src/pose_initializer/pose_initializer_core.cpp 0.00% <0.00%> (ø)
...initializer/src/pose_initializer/yabloc_module.cpp 0.00% <0.00%> (ø)
...bloc_common/include/yabloc_common/ground_plane.hpp 0.00% <0.00%> (ø)
...c_common/ground_server/filter/moving_averaging.hpp 0.00% <0.00%> (ø)
...ommon/include/yabloc_common/ground_server/util.hpp 0.00% <0.00%> (ø)
...abloc/yabloc_common/src/camera_info_subscriber.cpp 0.00% <0.00%> (ø)
localization/yabloc/yabloc_common/src/color.cpp 0.00% <0.00%> (ø)
...ization/yabloc/yabloc_common/src/cv_decompress.cpp 0.00% <0.00%> (ø)
...yabloc/yabloc_common/src/extract_line_segments.cpp 0.00% <0.00%> (ø)
...oc_common/src/ground_server/ground_server_core.cpp 0.00% <0.00%> (ø)
... and 51 more

... and 1455 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.

Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
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 (Also confirmed that both YabLoc and NDT mode works with given sample rosbags)

Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Copy link
Contributor

@YamatoAndo YamatoAndo left a comment

Choose a reason for hiding this comment

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

LGTM about pose_initilizer

@KYabuuchi KYabuuchi merged commit 98ef534 into autowarefoundation:main Jun 22, 2023
20 of 24 checks passed
@KYabuuchi KYabuuchi deleted the feature/direct_yabloc_integration branch June 22, 2023 04:40
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.

None yet

6 participants