Using diagnostic_updater in a ros2_control resource (actuator etc)
Hi!
In ROS 1 I use an diagnostic_updater::Updater
to publish hardware infos like status/error words, current device mode etc.
The usage is pretty straight forward like creating the diagnostic Updater in my RobotHW instance and registering a updateDiagnostics(diagnostic_updater::DiagnosticStatusWrapper& stat)
method for each hw component to it.
Doing this in ros2_control resource like an Actuator etc. seems to be not that easy. The Updater ctor now needs a NodeT https://github.com/ros/diagnostics/bl... which makes sense since it needs to create the publisher.
My actuator is define like class RobotMotorActuator : public BaseInterface<ActuatorInterface>
- so no access to a NodeT. I was thinking if I can get somehow the NodeT of the ControllerManager which I guess is actually the node loading my driver with the ResourceManager but I did not find a way to retrive it (for a reason? :) )
Maybe there is now a different best pratice. As an alternative I'm thining about a bunch of own StateInterface definitions and perform the Diagnostics in the controller.
Long story short - what is the intended way of bringing hardware diagnostic informations to the diagnostics 'subsystem' in ros2_control?
Thanks a lot!