ros2_controllers icon indicating copy to clipboard operation
ros2_controllers copied to clipboard

Add statistics collection to `mock_components/GenericSystem`

Open AndyZe opened this issue 3 years ago • 2 comments

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.

AndyZe avatar Nov 15 '22 14:11 AndyZe

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.

mcbed avatar Nov 16 '22 18:11 mcbed

For https://github.com/ros-controls/ros2_control/pull/806 we used an instrumented JTC and instrumented mock hardware components

bmagyar avatar Nov 17 '22 13:11 bmagyar