Repository navigation
refactor(autoware_radar_objects_adapter): align the README and the default_* parameters with what the node does - #13538
Merged
technolojin merged 2 commits intoOct 26, 2026
Conversation
…of its input The README now says what the conversion assumes rather than leaving it to the code: positions and their covariances are taken in the header frame and published as they are, velocities and accelerations are absolute and rotated into the object's frame, the absolute_dynamics flag is not checked, and which object fields are required and which fall back to the default_* parameters. The classification_remap section states that the probabilities are treated as independent confidences and are not merged when two labels map to the same one, in place of the note that only observed the duplicates. None of this changes with the refactoring under way; it is what the node has done since the characterization tests pinned it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Kentaro NAGATOMO <kentaro.nagatomo@tier4.jp>
…rs as double The six default_* parameters were declared as float and stored as float in RadarObjectsAdapterParams, although rclcpp parameters are double and every field they end up in (a position, a twist, a shape dimension) is double. They are now double end to end, and so is the value update_radar_info() reports for a defaulted field. The test parameters lose their casts. Values that a float represents exactly, such as the shipped configuration (0.0, 5.0, 2.0), come out the same; any other value changes the output at the 1e-8 level. The existing cases use only exactly representable values and so could not tell the two apart; two new cases use values a float cannot represent (0.1, 4.1, ...) and check that they reach the output as written, one through the adapter (every defaulted field) and one through the node and its parameter declaration. Both fail on the float code. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Kentaro NAGATOMO <kentaro.nagatomo@tier4.jp>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13538 +/- ##
=======================================
Coverage 37.76% 37.76%
=======================================
Files 2031 2031
Lines 141709 141709
=======================================
Hits 53519 53519
Misses 88190 88190
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kentdotn
marked this pull request as ready for review
October 23, 2026 05:23
interimadd
approved these changes
Oct 23, 2026
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Purpose
This PR is two small corrections that bring
radar_objects_adapterand its README into line with each other, on the way through phase 5 of the separation of the conversion logic from the ROS node (the strategy ofTrafficLightMapVisualizerNode, #12487 → #12612). Where the README was behind the code, the README is corrected; where the code was behind its own schema, the code is. Neither changes what the node publishes on the vehicle.What changes
The README says what the node expects of its input (commit 1, documentation only). A new section, "What the input is expected to be", states what the conversion assumes rather than leaving it to the code: positions and their covariances are taken in the header frame and published as they are; velocities and accelerations are absolute and rotated into the object's frame; the
absolute_dynamicsflag is not checked; which object fields are required, and objects are dropped until a radar info declares them; and which fields fall back to thedefault_*parameters, with the yaw variances set only when the standard deviations are declared. Theclassification_remapsection states that the probabilities are treated as independent confidences and are not merged when two labels map to the same one, in place of the note that only observed the duplicates. Everything it states is what the node has done since the characterization tests pinned it; the sentences that belong to a change in behavior travel with that change in later PRs.The
default_*parameters are read asdouble(commit 2). They were declared withdeclare_parameter<float>and stored asfloatinRadarObjectsAdapterParams, although the schema saysnumber, rclcpp parameters aredouble, and every field they end up in (a position, a twist, a shape dimension) isdouble. They are nowdoubleend to end, and so is the valueupdate_radar_info()reports for a defaulted field; the test parameters lose their casts. Values that afloatrepresents exactly, such as the shipped configuration (0.0,5.0,2.0), come out the same. Any other value is no longer rounded tofloatprecision on the way, which changes the output at the 1e-8 level. The existing cases use only exactly representable values and so could not tell the two apart; two new cases use values afloatcannot represent (0.1,4.1, ...) and check that they reach the output as written:Detections_UndeclaredFields_ParameterNotRoundedToFloatthrough the adapter (every defaulted field) andConstruct_DefaultParameterNotRepresentableAsFloat_ReachesOutputthrough the node and its parameter declaration. Both fail on thefloatcode (0.10000000149011612instead of0.1).Related links
Parent Issue:
Related PRs:
floatwas noted and left alone in refactor(autoware_radar_objects_adapter): prepare the node for the logic separation #13465 and refactor(autoware_radar_objects_adapter): separate the conversion from the node #13470; the answers the README writes down are the maintainers' replies on refactor(autoware_radar_objects_adapter): separate the conversion from the node #13470 (the radar info, the probabilities).How was this PR tested?
From the CI-equivalent dev container (
ghcr.io/autowarefoundation/autoware:universe-dependencies-jazzy):colcon build --packages-select autoware_radar_objects_adapter \ --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo colcon test --packages-select autoware_radar_objects_adapter \ --event-handlers console_direct+floatcode as well and fail there.markdownlint,clang-format,cpplintand the rest of the repository'spre-commithooks pass.Notes for reviewers
rclcppstores afloatparameter as itsdoubleand converts back on read; dropping that round trip is the whole code change.Interface changes
None. The parameter names and the schema do not change.
Effects on system behavior
A
default_*value that afloatcannot represent exactly (for example0.1) now reaches the output as written instead of rounded tofloatprecision, a difference at the 1e-8 level. The shipped configuration is unaffected.🤖 Generated with Claude Code