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(ndt_scan_matcher): rework parameters #6229

Conversation

YamatoAndo
Copy link
Contributor

Description

Implement the ROS Node configuration layout described in https://github.com/orgs/autowarefoundation/discussions/3371.

  • Remove the default value from the source code in order to ensure all parameter values are passed from the parameter files.
    • already completed.
  • Create the yaml configs in this package and the autoware_launch repository.
    • already completed.
  • Create the schema.
    • This PR.
  • Update Parameters chapter in the readme file.
    • This PR.

Tests performed

Lsim works.
passed check-jsonschema.

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.

@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) labels Jan 30, 2024
@YamatoAndo
Copy link
Contributor Author

I will open this pr after merging #6208 and #6231

@SakodaShintaro
Copy link
Contributor

@YamatoAndo

It works fine when I check schema locally in my pc.

~/autoware/src/universe/autoware.universe/localization$ find -wholename '*/schema/*.schema.json' -printf '%p: ' -execdir bash -c 'check-jsonschema --schemafile "$1" ../config/"${1:2:-12}"*.param.yaml' bash '{}' +
./pose_instability_detector/schema/pose_instability_detector.schema.json: ok -- validation done
./twist2accel/schema/twist2accel.schema.json: ok -- validation done
./gyro_odometer/schema/gyro_odometer.schema.json: ok -- validation done
./yabloc/yabloc_common/schema/ll2_decomposer.schema.json: ./yabloc/yabloc_common/schema/ground_server.schema.json: ok -- validation done
./yabloc/yabloc_image_processing/schema/graph_segment.schema.json: ./yabloc/yabloc_image_processing/schema/segment_filter.schema.json: ./yabloc/yabloc_image_processing/schema/undistort.schema.json: ok -- validation done
./yabloc/yabloc_pose_initializer/schema/camera_pose_initializer.schema.json: ok -- validation done
./yabloc/yabloc_monitor/schema/yabloc_monitor.schema.json: ok -- validation done
./yabloc/yabloc_particle_filter/schema/camera_particle_corrector.schema.json: ./yabloc/yabloc_particle_filter/schema/gnss_particle_corrector.schema.json: ./yabloc/yabloc_particle_filter/schema/predictor.schema.json: ok -- validation done
./geo_pose_projector/schema/geo_pose_projector.schema.json: ok -- validation done
./ndt_scan_matcher/schema/ndt_scan_matcher.schema.json: ok -- validation done
./landmark_based_localizer/ar_tag_based_localizer/schema/ar_tag_based_localizer.schema.json: ok -- validation done
./localization_error_monitor/schema/localization_error_monitor.schema.json: ok -- validation done
./stop_filter/schema/stop_filter.schema.json: ok -- validation done

However, it seems that the pull request check is failing.

https://github.com/autowarefoundation/autoware.universe/actions/runs/7707283935/job/21135764003?pr=6229

./localization/ndt_scan_matcher/schema/ndt_scan_matcher.schema.json: Schema validation errors were encountered.
  ../config/ndt_scan_matcher.param.yaml::$./**.ros__parameters: 'frame' is a required property
  ../config/ndt_scan_matcher.param.yaml::$./**.ros__parameters: 'ndt' is a required property
  ../config/ndt_scan_matcher.param.yaml::$./**.ros__parameters: 'initial_pose_estimation' is a required property
  ../config/ndt_scan_matcher.param.yaml::$./**.ros__parameters: 'validation' is a required property
  ../config/ndt_scan_matcher.param.yaml::$./**.ros__parameters: 'score_estimation' is a required property
  ../config/ndt_scan_matcher.param.yaml::$./**.ros__parameters: 'covariance' is a required property
  ../config/ndt_scan_matcher.param.yaml::$./**.ros__parameters: 'dynamic_map_loading' is a required property
  ../config/ndt_scan_matcher.param.yaml::$./**.ros__parameters: Additional properties are not allowed ('base_frame', 'converged_param_nearest_voxel_transformation_likelihood', 'converged_param_transform_probability', 'converged_param_type', 'critical_upper_bound_exe_time_ms', 'dynamic_map_loading_map_radius', 'dynamic_map_loading_update_distance', 'estimate_scores_by_no_ground_points', 'initial_estimate_particles_num', 'initial_pose_distance_tolerance_m', 'initial_pose_offset_model_x', 'initial_pose_offset_model_y', 'initial_pose_timeout_sec', 'input_sensor_points_queue_size', 'lidar_radius', 'lidar_topic_timeout_sec', 'map_frame', 'max_iterations', 'n_startup_trials', 'ndt_base_frame', 'num_threads', 'output_pose_covariance', 'regularization_enabled', 'regularization_scale_factor', 'resolution', 'step_size', 'trans_epsilon', 'use_covariance_estimation', 'z_margin_for_ground_removal' were unexpected)

Do you know what the cause is?

@YamatoAndo
Copy link
Contributor Author

YamatoAndo commented Feb 2, 2024

Sorry.
I need to update the branch after merging #6208.

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (57f8a94) 14.37% compared to head (f66d080) 14.37%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6229   +/-   ##
=======================================
  Coverage   14.37%   14.37%           
=======================================
  Files        1907     1907           
  Lines      130072   130071    -1     
  Branches    37618    37617    -1     
=======================================
  Hits        18697    18697           
+ Misses      90366    90365    -1     
  Partials    21009    21009           
Flag Coverage Δ *Carryforward flag
differential 3.49% <ø> (?)
total 14.37% <ø> (+<0.01%) ⬆️ Carriedforward from 57f8a94

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

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 confirmed followings.

  • find -wholename '*/schema/*.schema.json' -printf '%p: ' -execdir bash -c 'check-jsonschema --schemafile "$1" ../config/"${1:2:-12}"*.param.yaml' bash '{}' +
  • mkdocs serve
  • logging_simulator
  • Code Review
    • mainly checking consistency of parameter descriptions, types and ranges

Looks Good To Me

@YamatoAndo YamatoAndo merged commit 69e16f4 into autowarefoundation:main Feb 5, 2024
22 of 23 checks passed
zulfaqar-azmi-t4 pushed a commit to zulfaqar-azmi-t4/autoware.universe that referenced this pull request Feb 6, 2024
* refactor(ndt_scan_matcher): rework parameters

Signed-off-by: Yamato Ando <[email protected]>

* delete tmp file

Signed-off-by: Yamato Ando <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Yamato Ando <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
anhnv3991 pushed a commit to anhnv3991/autoware.universe that referenced this pull request Feb 13, 2024
* refactor(ndt_scan_matcher): rework parameters

Signed-off-by: Yamato Ando <[email protected]>

* delete tmp file

Signed-off-by: Yamato Ando <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Yamato Ando <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
* refactor(ndt_scan_matcher): rework parameters

Signed-off-by: Yamato Ando <[email protected]>

* delete tmp file

Signed-off-by: Yamato Ando <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Yamato Ando <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants