luxonis / depthai-ros

Official ROS Driver for DepthAI Sensors.
MIT License
251 stars 185 forks source link

[Feature-Request] Respawning composed node in rgbd_plc.launch.py, restarting from failed states. #536

Closed TheMarksniper closed 3 months ago

TheMarksniper commented 4 months ago

Why: The composable nodes in rgbd_plc.launch.py (same goes for rtabmap.launch.py) do not have any way to get out of critical failure states, for example: X_LINK_ERROR and ping missed messages which seemingly break the pipeline. image It would be nice if there was a way to kill the nodes and restart the pipeline since ros2 does not support node killing like ros1 did.

What: A parameter that would allow (composable)nodes to exit (and start up) gracefully after critical error.

How: Maybe before resulting to straight up killing the nodes, a lifecycle nodes could be implemented and just the pipeline could be destroyed (in on_cleanup()) and restored (in on_configuration()). Otherwise, just exit() in critical failed state, and parameter for respawn in the launcher would be also doable.

Serafadam commented 4 months ago

Hi, unfortunately Lifecycle nodes are not supported by image_transport package so unfortunately they cannot be used by camera drivers. There is a watchdog/restart mechanism that you can enable via parameter, but in some edge cases it might fail.

TheMarksniper commented 3 months ago

Thank you for that restart mechanism, i guess nothing more can be done about it now