Skip to content

fix: publish the CartesianController debug values from an own registry - #79

Open
destogl wants to merge 1 commit into
learnsyslab:mainfrom
b-robotized-forks:fix/cartesian-controller-own-debug-registry
Open

destogl wants to merge 1 commit into
learnsyslab:mainfrom
b-robotized-forks:fix/cartesian-controller-own-debug-registry

Conversation

@destogl

@destogl destogl commented Nov 19, 2026

Copy link
Copy Markdown

With enable_introspection: true, each activation and deactivation of the CartesianController caused a realtime cycle overrun on a ctrlX CORE X3 (arm64, 2 ms cycle): 2058–2245 µs. With enable_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 calls enable_introspection(true/false) for each controller in its lifecycle callbacks, which run in the realtime loop. The next publishAsync() handles these changes there: a linear search over all registered values per changed value, plus a registry change. Details: ros-controls/ros2_control#3802

Change

  • on_configure() creates an own pal_statistics::StatisticsRegistry on the controller node, if enable_introspection is set. It registers the same values without bookkeeping and starts the publisher thread.
  • update() calls publishAsync() on this registry.
  • Topic: <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

…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>
@destogl

destogl commented Nov 19, 2026

Copy link
Copy Markdown
Author

It might be that we just nedd to pre-warm the registry as shown here: b-robotized-forks/ros2_control@fe36342

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant