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(radar_fusion_to_detected_object): rework parameters #4663

Conversation

PhoebeWu21
Copy link
Member

@PhoebeWu21 PhoebeWu21 commented Aug 18, 2023

Description

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

  • Remove the default value from the source code in order to ensure all parameter values are passed from the parameter files.
  • Create the schema

Tests performed

Package built locally.
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to radar_fusion_to_detected_object

Effects on system behavior

More reliable and faster parameter configuration file creation.

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.

@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:perception Advanced sensor data processing and environment understanding. (auto-assigned) labels Aug 18, 2023
Copy link
Contributor

@ambroise-arm ambroise-arm 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

@kaspermeck-arm kaspermeck-arm left a comment

Choose a reason for hiding this comment

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

Looks good!

core_param_.threshold_probability =
declare_parameter<float>("core_params.threshold_probability", 0.0);
Copy link
Contributor

Choose a reason for hiding this comment

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

[MUST] Probability value is defined by float in Autoware message. Please revert to float.

Copy link
Member Author

@PhoebeWu21 PhoebeWu21 Aug 28, 2023

Choose a reason for hiding this comment

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

Hi @scepter914 , it was "float" in my previous commit, but @ambroise-arm asked me to change to "double" because of the new Declare Parameter Function. ( see in #4537 (comment))

Please let me know which to follow. Thanks!

Copy link
Contributor

@ambroise-arm ambroise-arm Aug 29, 2023

Choose a reason for hiding this comment

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

@scepter914 Yes, as I wrote in the comment linked above, the return type of declare_parameter<float>() is actually double. So for clarity we should write declare_parameter<double>().

Copy link
Contributor

@scepter914 scepter914 Aug 29, 2023

Choose a reason for hiding this comment

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

@PhoebeWu21 @ambroise-arm
Thank you for comment.
I agree with the reason changing from "float" to "double", but pre-commit.ci failed.
So I cannot approve until you debug this build fail.

I think two way to solve this problem.

  • Debug it in this PR.
  • Once revert the changing the parameter type and merge this PR for main branch, and make new PR for the commit of it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure how the change from float to double relates to the pre-commit.ci failure. It is not a build job but a linting job, and the failures it reports look unrelated to the changes in this PR.
Let's see what the build-and-test* jobs result in for building the code.

Copy link
Contributor

Choose a reason for hiding this comment

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

There are no pre-commit.ci failures in other PR. So I guess build-and-test* jobs don't have problem and your change cause pre-commit.ci failures.
I recommend that you construct local environment and debug it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @scepter914,
Finally, pre-commit.ci check has passed.

Copy link
Contributor

Choose a reason for hiding this comment

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

@PhoebeWu21
[imo] Since core_param_.threshold_probability is defined as float, this is implicit type conversion here.
Is this meant?

@scepter914 scepter914 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 30, 2023
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (8f9da61) 15.12% compared to head (2a3382e) 15.12%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4663   +/-   ##
=======================================
  Coverage   15.12%   15.12%           
=======================================
  Files        1571     1571           
  Lines      108229   108165   -64     
  Branches    33224    33195   -29     
=======================================
- Hits        16367    16365    -2     
+ Misses      74032    73971   -61     
+ Partials    17830    17829    -1     
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 15.13% <ø> (+<0.01%) ⬆️ Carriedforward from e20eb0f

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

Files Changed Coverage Δ
...ion/crosswalk_traffic_light_estimator/src/node.cpp 0.00% <ø> (ø)
...de/radar_object_fusion_to_detected_object_node.cpp 0.00% <0.00%> (ø)
...behavior_velocity_crosswalk_module/src/manager.cpp 11.65% <ø> (+0.22%) ⬆️
..._velocity_crosswalk_module/src/scene_crosswalk.cpp 0.00% <ø> (ø)
..._velocity_crosswalk_module/src/scene_crosswalk.hpp 0.00% <ø> (ø)
...avior_velocity_intersection_module/src/manager.cpp 18.86% <ø> (ø)
...ity_intersection_module/src/scene_intersection.cpp 0.00% <ø> (ø)
...ity_intersection_module/src/scene_intersection.hpp 0.00% <ø> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@scepter914 scepter914 enabled auto-merge (squash) August 30, 2023 06:07
@scepter914 scepter914 merged commit 198587c into autowarefoundation:main Aug 30, 2023
21 of 24 checks passed
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Aug 30, 2023
…efoundation#4663)

* refactor(radar_fusion_to_detected_object): rework parameters

Signed-off-by: PhoebeWu21 <[email protected]>

* style(pre-commit): autofix

* style(pre-commit): autofix

* style(pre-commit): autofix

---------

Signed-off-by: PhoebeWu21 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Satoshi Tanaka <[email protected]>
@PhoebeWu21 PhoebeWu21 deleted the refactor-node-config-radar_fusion_to_detected_object branch September 8, 2023 08:51
TetsuKawa pushed a commit to tier4/autoware.universe that referenced this pull request Dec 8, 2023
…efoundation#4663)

* refactor(radar_fusion_to_detected_object): rework parameters

Signed-off-by: PhoebeWu21 <[email protected]>

* style(pre-commit): autofix

* style(pre-commit): autofix

* style(pre-commit): autofix

---------

Signed-off-by: PhoebeWu21 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Satoshi Tanaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) 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.

5 participants