feat(dc_measurements): resolve robot_name from literal, hostname, or file - #456
Merged
Minipada merged 3 commits intoAug 31, 2026
Merged
Conversation
…file Records already carry robot_name through custom keys, but the value had to be written literally into each robot's params file -- one hand-edited file per robot in a fleet. robot_name now resolves in order: a literal custom_keys_str.robot_name.value (unchanged), then custom_keys_str.robot_name.value_from_file, then the machine's hostname as the default when neither is set. A missing file or an empty resolved value fails node configuration with a clear error instead of shipping Records with a blank robot_name. Closes #442 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LgsQrndgkMK3F7bUcWoU3a Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
Include order and continuation-line alignment CI's clang-format hook flagged on PR #456. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LgsQrndgkMK3F7bUcWoU3a Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## jazzy #456 +/- ##
==========================================
+ Coverage 70.93% 71.00% +0.08%
==========================================
Files 119 119
Lines 7401 7427 +26
==========================================
+ Hits 5249 5273 +24
- Misses 2152 2154 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rclcpp_lifecycle wraps on_configure() in its own catch and converts an uncaught exception into CallbackReturn::ERROR instead of propagating it to the caller of configure() -- the same behavior test_measurement_bool_equal.cpp already documents for BoolEqual's type-mismatch case. RobotNameMissingFile- FailsConfigureClearly was asserting the wrong thing (EXPECT_THROW), which CI's colcon test caught: configure() logged the "robot_name: could not read value_from_file" error exactly as intended but returned normally, so the test now asserts the node fails to reach the inactive state instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LgsQrndgkMK3F7bUcWoU3a Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
Minipada
added a commit
that referenced
this pull request
Aug 31, 2026
Include order and continuation-line alignment CI's clang-format hook flagged on PR #456. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LgsQrndgkMK3F7bUcWoU3a Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
github-actions
Bot
deleted the
feature/442-flexible-robot-name-resolution-literal-h
branch
August 31, 2026 11:24
6 tasks
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.
Summary
robot_name(a custom key already carried by Records viacustom_key_str_list) nowresolves in order: a literal
custom_keys_str.robot_name.value(today's behaviour,unchanged), then
custom_keys_str.robot_name.value_from_file, then the machine'shostname as the default when neither is set — so a fleet doesn't need one hand-edited
params file per robot.
value_from_filethat names an unreadable/missing file, or any source that resolvesto an empty string, now fails node configuration with a clear
std::runtime_errorinstead of silently shipping Records with a missing or blank
robot_name.robot_namekey only.doc/src/dc/measurements.md.Closes #442
Test plan
dc_measurementsgtest coverage intest_measurement_dummy.cpp:valuestill wins (unchanged behaviour)value_from_filevalue_from_filethrows atconfigure()timecolcon testviatools/e2e/scripts/build.sh(triggered by this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01LgsQrndgkMK3F7bUcWoU3a