ros-controls / ros2_control_demos

This repository aims at providing examples to illustrate ros2_control and ros2_controllers
https://control.ros.org
Apache License 2.0
392 stars 185 forks source link

Refactor logging #543

Open christophfroehlich opened 1 month ago

christophfroehlich commented 1 month ago

I had issues with writing tests for the demos, and one cause might be an overload of logging in the hardware components.

Since https://github.com/ros-controls/ros2_control/pull/1585 we have logger+clock in the interfaces, so I refactored the hardware components and use throttled logging on top of that.

We encountered an issue with throttled logging from identical plugins https://github.com/ros2/rclcpp/issues/2587, this is why logging in example_6 does not work currently.

Note: This is not 1:1 backportable because the API changes were not backported. But this can be achieved by adding local member variables for clock and logger to the hardware components.

mergify[bot] commented 1 month ago

This pull request is in conflict. Could you fix it @christophfroehlich?

christophfroehlich commented 1 month ago

I reverted the changes to the update rates as suggested here