Custom Object Detection with ROS

Hello, I’m trying to follow the tutorial for custom object detection with the Zed2 using ROS. My question is, is this even possible? Because the current way my ROS architecture is setup is as follows:

zed-ros-wrapper publishes the camera stream, which is subscribed to by my custom object detector (darknet_ros, although this is irrelevant)

darknet_ros publishes 2d bounding boxes

Another ros node subscribes to the 2d bounding boxes. I want this node to call the zed.ingestCustomBoxObjects(objects_in); function. However, this isn’t possible since this node would need to open the camera, but the camera is already open in the zed-ros-wrapper. Is this a possible workflow? If not, what is the best way to integrate this custom object detection with ROS?

Hi @harrijin
this feature is not yet available in ROS and we are studying the best way to add it.
Custom object tracking requires custom user code and it’s not easy to add it to the wrapper.
One solution could be to add a new node providing the 2D bounding box to be injected to the ZED wrapper, but this would introduce a lot of latency because of the problem that you cited: a second process cannot open the camera simultaneously.

Today, the only solution is to modify the source code of the wrapper and add your custom detection code.