stereolabs / zed-ros2-wrapper

ROS 2 wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros2/
Apache License 2.0
140 stars 143 forks source link

Add a service for rebooting camera #140

Open scheideman opened 1 year ago

scheideman commented 1 year ago

Preliminary Checks

Proposal

Add a service to the ROS 2 node that allows you to reboot the device. Optionally, reboot the camera if it cannot grab images or connect to the camera after a timeout.

Note: this sort of behaviour could be implemented using the LifecycleNode interface. But I see that the ROS 2 wrapper switched away from using LifecycleNode in patch 3.3.1

Use-Case

Because USB cameras can be unreliable and disconnect due to vibration or other random occurrences I need to periodically restart the ROS 2 node and sometimes call the reboot function using another script.

If the wrapper had a service that allowed me to reboot the camera then I could call it if the publishing rate dropped below some threshold. Also, if the wrapper tried to reboot on startup when a camera is unreachable this would save me needing to run another script to reboot the cameras or manually unplugging and re-plugging the cameras.

Anything else?

No response

peredwardsson commented 1 year ago

I second the need for this. The camera node doesn't warn when its publishing rate decreases, i just notice other reliant nodes performing worse and worse. Any type of semiautomatic reboot would be great.