ros2_controllers
ros2_controllers copied to clipboard
Add statistics collection to `mock_components/GenericSystem`
When running simulations, it would be nice to add statistics collection to mock_components/GenericSystem. For example:
- What is the average rate of incoming commands?
- What is the average latency (from message stamp to message received)?
- What is the standard deviation of time between messages?
I think it would also be nice to add a service call to trigger this data collection so it doesn't begin until the user is ready.
I don't have any immediate need for this but it would have been nice on a few projects in the past.
Bonus if this can be done on hardware as well without breaking realtime constraints.
Hi Andy, In terms of functionality inside the framework, does it change something to collect this data in a hardware interface rather than in a dedicated controller ? We use some of what you describe here but in a controller version to test our setups what allows us to collect data also if running a real hardware and I am curious if we could expect some different results.
For https://github.com/ros-controls/ros2_control/pull/806 we used an instrumented JTC and instrumented mock hardware components