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(map_height_fitter): fitting by vector_map #6340

Conversation

SakodaShintaro
Copy link
Contributor

@SakodaShintaro SakodaShintaro commented Feb 6, 2024

Description

This pull request adds a new feature to map_height_fitter to fit z position by vector_map.

Context

planning_simulator does not use Localization, so the PointCloud map is essentially unnecessary. However, because map_height_fitter relies on PointCloud map to fit the z position of initial pose, planning_simulator as a whole relies on PointCloud map.

This dependency causes changes to PointCloud map to affect planning_simulator. Below is an example.
#6294

Modifying the map_height_fitter to be able to fit the z position from the vector_map allows planning_simulator to work independently of the PointCloud map.

Changes

  • Added a new feature to map_height_fitter to fit z position by vector_map.
  • Added fit_target as an argument to maintain the same behavior as before. You can choose from vector_map or pointcloud_map. Default is pointcloud_map.

Related PR

Tests performed

AWSIM

I have confirmed that both fit_target works properly.

ros2 launch autoware_launch e2e_simulator.launch.xml \
    map_path:=path/to/map \
    vehicle_model:=sample_vehicle \
    sensor_model:=awsim_sensor_kit
ros2 launch autoware_launch e2e_simulator.launch.xml \
    map_path:=path/to/map \
    vehicle_model:=sample_vehicle \
    sensor_model:=awsim_sensor_kit \
    fit_target:='pointcloud_map'

planning_simulator

The following command works correctly even if there is no pcd in sample-map-planning.

ros2 launch autoware_launch planning_simulator.launch.xml \
  map_path:=path/to/sample-map-planning/ \
  vehicle_model:=sample_vehicle \
  sensor_model:=sample_sensor_kit

driving_log_replayer

The following command works fine.

driving_log_replayer simulation run -p localization --rate 0.5

Effects on system behavior

In default setting, there are no effects on system 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.

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.

@github-actions github-actions bot added component:localization Vehicle's position determination in its environment. (auto-assigned) component:system System design and integration. (auto-assigned) component:map Map creation, storage, and loading. (auto-assigned) labels Feb 6, 2024
@SakodaShintaro SakodaShintaro self-assigned this Feb 7, 2024
Signed-off-by: Shintaro Sakoda <[email protected]>
Signed-off-by: Shintaro Sakoda <[email protected]>
@SakodaShintaro SakodaShintaro added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Feb 7, 2024
@SakodaShintaro SakodaShintaro requested review from soblin and removed request for soblin February 7, 2024 06:26
@SakodaShintaro SakodaShintaro marked this pull request as ready for review February 7, 2024 06:27
Signed-off-by: Shintaro Sakoda <[email protected]>
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 84 lines in your changes are missing coverage. Please review.

Comparison is base (99c8b32) 14.88% compared to head (461fd40) 14.84%.
Report is 6 commits behind head on main.

Files Patch % Lines
map/map_height_fitter/src/map_height_fitter.cpp 0.00% 84 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6340      +/-   ##
==========================================
- Coverage   14.88%   14.84%   -0.05%     
==========================================
  Files        1838     1845       +7     
  Lines      126709   126024     -685     
  Branches    38044    37497     -547     
==========================================
- Hits        18865    18710     -155     
+ Misses      86545    86414     -131     
+ Partials    21299    20900     -399     
Flag Coverage Δ *Carryforward flag
differential 3.28% <0.00%> (?)
total 14.85% <ø> (-0.04%) ⬇️ Carriedforward from 9a47cde

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

@SakodaShintaro
Copy link
Contributor Author

[Additional test]
map_height_fitter is launched as a node in driving_log_replayer. I confirmed that driving_log_replayer still works fine after this pull request change.

driving_log_replayer simulation run -p localization --rate 0.5

@SakodaShintaro
Copy link
Contributor Author

SakodaShintaro commented Feb 8, 2024

Sorry, it seems there is an error in driving_log_replayer. please wait a moment

-> Fixed in 21b4f3f

and json schema is fixed in 69ceb62

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

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.

I have confirmed that it works as intended in several modes. 🙆‍♂️
I made a minor point. Once it is resolved, I can approve this.

map/map_height_fitter/src/map_height_fitter.cpp Outdated Show resolved Hide resolved
Signed-off-by: Shintaro Sakoda <[email protected]>
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

@TaikiYamada4 TaikiYamada4 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 f812ea8 into autowarefoundation:main Feb 13, 2024
18 of 24 checks passed
@SakodaShintaro SakodaShintaro deleted the feat/z_fitting_by_vectormap branch February 13, 2024 05:25
StepTurtle pushed a commit to StepTurtle/autoware.universe that referenced this pull request Feb 28, 2024
* Added fit_target

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed group

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed to run

Signed-off-by: Shintaro Sakoda <[email protected]>

* style(pre-commit): autofix

* Fixed to work by pointcloud_map

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed comments

Signed-off-by: Shintaro Sakoda <[email protected]>

* Added a comment

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed a comment

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed to use arg

Signed-off-by: Shintaro Sakoda <[email protected]>

* Added info log

Signed-off-by: Shintaro Sakoda <[email protected]>

* FIxed default value

Signed-off-by: Shintaro Sakoda <[email protected]>

* FIxed default values

Signed-off-by: Shintaro Sakoda <[email protected]>

* Updated schema.json

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed description of fit_target

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed arg name

Signed-off-by: Shintaro Sakoda <[email protected]>

* Restore const

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed map_height_fitter.param.yaml

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed map_height_fitter.schema.json

Signed-off-by: Shintaro Sakoda <[email protected]>

* style(pre-commit): autofix

* Removed an unused variable

Signed-off-by: Shintaro Sakoda <[email protected]>

---------

Signed-off-by: Shintaro Sakoda <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Takagi, Isamu <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
* Added fit_target

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed group

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed to run

Signed-off-by: Shintaro Sakoda <[email protected]>

* style(pre-commit): autofix

* Fixed to work by pointcloud_map

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed comments

Signed-off-by: Shintaro Sakoda <[email protected]>

* Added a comment

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed a comment

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed to use arg

Signed-off-by: Shintaro Sakoda <[email protected]>

* Added info log

Signed-off-by: Shintaro Sakoda <[email protected]>

* FIxed default value

Signed-off-by: Shintaro Sakoda <[email protected]>

* FIxed default values

Signed-off-by: Shintaro Sakoda <[email protected]>

* Updated schema.json

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed description of fit_target

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed arg name

Signed-off-by: Shintaro Sakoda <[email protected]>

* Restore const

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed map_height_fitter.param.yaml

Signed-off-by: Shintaro Sakoda <[email protected]>

* Fixed map_height_fitter.schema.json

Signed-off-by: Shintaro Sakoda <[email protected]>

* style(pre-commit): autofix

* Removed an unused variable

Signed-off-by: Shintaro Sakoda <[email protected]>

---------

Signed-off-by: Shintaro Sakoda <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Takagi, Isamu <[email protected]>
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) component:map Map creation, storage, and loading. (auto-assigned) component:system System design and integration. (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.

4 participants