Repository navigation
feat: add radar_N.enabled to run one node per radar - #6
Merged
Merged
Conversation
davidt315
approved these changes
Sep 30, 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.
Summary
Adds a per-radar
enabledparameter to markradar_Nentries that have no sensor behind them.The driver maps
radar_Nto CAN sensor id N and stops at the first missing index,so a config with sensors 1, 3, 6 and 7 still needs placeholder entries for 0, 2, 4 and 5.
Today those placeholders act like real radars:
link_name.set_filterandset_radar_configurationaccept a placeholder's id and send that sensor default settings.With
radar_N.enabled: false(defaulttrue), the entry only holds its index:set_filterandset_radar_configurationreturnsuccess: falsefor its id.Existing configs are unaffected, since every entry defaults to enabled.
This also lets several driver nodes share one CAN bus.
Each node enables only its own radars, so no node overwrites another's filters.
Every node serves the same absolute service names,
so a request is carried out only by the node that enables that
sensor_id.Other changes
can_receive_callback's range check now usesisRadarEnabled(),which also fixes an unsigned underflow when no radars are configured.
radar_N.enabled.Example
One node, four radars on sensor ids 1, 3, 6 and 7:
Result
Measured on the AFM with ros_rate_latency.py, one driver node, four radars.
Gaps are in seconds, latencies in milliseconds.
Before (placeholders enabled): tracks arrive sporadically at 0.2–1.0 Hz, and some topics get no data at all.
After (placeholders enabled: false): all four radars publish steadily at 13.6 Hz.