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

refactor(map_projection_loader): rework parameters #6253

Conversation

TaikiYamada4
Copy link
Contributor

@TaikiYamada4 TaikiYamada4 commented Jan 31, 2024

This PR must be merged with autowarefoundation/autoware_launch#839

Description

This PR has done three changes.

  1. Extract ros parameters from map_projection_loader.launch.xml to map_projection_loader.param.yaml.
  2. Create map_projection_loader.schema.json to validate map_projection_loader.param.yaml.
  3. Let README.md to reflect ros parameters from map_projection_loader.schema.json.

Tests performed

1. Passing ros parameters

I did the rosbag replay simulation tutorial and checked.

ros2 param dump /map/map_projection_loader

and got the follwoing result which is expected.

/map/map_projection_loader:
  ros__parameters:
    lanelet2_map_path: /home/taikiyamada/autoware_map/sample-map-rosbag/lanelet2_map.osm
    map_projector_info_path: /home/taikiyamada/autoware_map/sample-map-rosbag/map_projector_info.yaml
    qos_overrides:
      /clock:
        subscription:
          depth: 1
          durability: volatile
          history: keep_last
          reliability: best_effort
      /parameter_events:
        publisher:
          depth: 1000
          durability: volatile
          history: keep_last
          reliability: reliable
    use_sim_time: true

2. JSON validation

I did the following command at autoware.universe/map/ and confirmed that map_projection_loader.schema.json and map_projection_loader.param.yaml are OK.

find -wholename '*/schema/*.schema.json' -printf '%p: ' -execdir bash -c 'check-jsonschema --schemafile "$1" ../config/"${1:2:-12}"*.param.yaml' bash '{}' +

3. Write a table of ros parameters via map_projection_loader.schema.json

I did mkdocs serve and confirmed that the table of ros parameters is constructed in the documents.

Effects on system behavior

Not applicable.

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.

…param.yaml

Added launch argument map_projection_loader_param_path to map.launch.xml

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
Modified README.md of map_projection_loader to read the schema.json file to construct the table of parameters

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
@TaikiYamada4 TaikiYamada4 added type:documentation Creating or refining documentation. (auto-assigned) component:map Map creation, storage, and loading. (auto-assigned) tag:deploy-docs Mark for deploy-docs action generation. (used-by-ci) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) labels Jan 31, 2024
@TaikiYamada4 TaikiYamada4 self-assigned this Jan 31, 2024
@github-actions github-actions bot added the component:launch Launch files, scripts and initialization tools. (auto-assigned) label Jan 31, 2024
Copy link
Contributor

@SakodaShintaro SakodaShintaro 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 completed checking the schema and confirming the operation in my environment. I will approve if you correct the typo.

map/map_projection_loader/README.md Outdated Show resolved Hide resolved
Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
…ikiYamada4/autoware.universe into refactor/map_projection_loader_params
@HansRobo
Copy link
Member

HansRobo commented Feb 1, 2024

I updated this branch to import #6278.
This will help you pass build-and-test-differential faster.

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6be9a00) 14.38% compared to head (2ed128a) 14.42%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6253      +/-   ##
==========================================
+ Coverage   14.38%   14.42%   +0.03%     
==========================================
  Files        1907     1906       -1     
  Lines      129943   129570     -373     
  Branches    37616    37516     -100     
==========================================
- Hits        18697    18686      -11     
+ Misses      90237    89923     -314     
+ Partials    21009    20961      -48     
Flag Coverage Δ *Carryforward flag
differential 37.79% <ø> (?)
total 14.42% <ø> (+0.03%) ⬆️ Carriedforward from 82e051f

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

@TaikiYamada4 TaikiYamada4 merged commit 295ed1d into autowarefoundation:main Feb 2, 2024
22 of 23 checks passed
@TaikiYamada4 TaikiYamada4 deleted the refactor/map_projection_loader_params branch February 2, 2024 04:47
anhnv3991 pushed a commit to anhnv3991/autoware.universe that referenced this pull request Feb 13, 2024
…n#6253)

* Extract all params in map_projection_loader to map_projection_loader.param.yaml
Added launch argument map_projection_loader_param_path to map.launch.xml

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>

* Added map_projection_loader.schema.json.
Modified README.md of map_projection_loader to read the schema.json file to construct the table of parameters

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>

* style(pre-commit): autofix

* Fixed typo

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>

---------

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…n#6253)

* Extract all params in map_projection_loader to map_projection_loader.param.yaml
Added launch argument map_projection_loader_param_path to map.launch.xml

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>

* Added map_projection_loader.schema.json.
Modified README.md of map_projection_loader to read the schema.json file to construct the table of parameters

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>

* style(pre-commit): autofix

* Fixed typo

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>

---------

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.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:map Map creation, storage, and loading. (auto-assigned) tag:deploy-docs Mark for deploy-docs action generation. (used-by-ci) 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