Repository navigation
Conversation
…rol registry With enable_introspection, the debug values were in the ros2_control introspection registry. ros2_control enables and disables these values at each activation and deactivation, in the realtime loop. On a ctrlX CORE X3 (2 ms cycle) this caused a watchdog error at each switch. The controller now creates its own pal_statistics registry in on_configure() and publishes it from update() with publishAsync() on '<controller name>/introspection_data'. The switch does not change it. Co-Authored-By: Frank <frank@b-robotized.ai>
Author
|
It might be that we just nedd to pre-warm the registry as shown here: b-robotized-forks/ros2_control@fe36342 |
This was referenced Nov 19, 2026
This branch has not been deployed
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.
With
enable_introspection: true, each activation and deactivation of theCartesianControllercaused a realtime cycle overrun on a ctrlX CORE X3 (arm64, 2 ms cycle): 2058–2245 µs. Withenable_introspection: false, the same switches gave no overrun.Cause
The debug values were registered in the ros2_control introspection registry (
REGISTER_ROS2_CONTROL_INTROSPECTION). ros2_control callsenable_introspection(true/false)for each controller in its lifecycle callbacks, which run in the realtime loop. The nextpublishAsync()handles these changes there: a linear search over all registered values per changed value, plus a registry change. Details: ros-controls/ros2_control#3802Change
on_configure()creates an ownpal_statistics::StatisticsRegistryon the controller node, ifenable_introspectionis set. It registers the same values without bookkeeping and starts the publisher thread.update()callspublishAsync()on this registry.<controller name>/introspection_data/full(and/names,/values). The value names have no<controller name>.prefix any more.The values are no longer in the ros2_control registry, so a switch does not change any registry.
Tests
cartesian_impedance_controllerwithenable_introspection: true: no cycle overrun. Before: one overrun at each switch. Tested together with fix: reset the CartesianController state on activation and keep the realtime path free of allocations #78.