Modifying mpa-to-ros
-
Working with the m500 (voxl flight), we are having issues streaming video to our ground station in order to process via yolov5. Obviously it's a bandwidth problem, as to my understanding mpa_to_ros just slams whatever the cameras are outputting over the network with no regards to whether the ground station is able to receive it.
A simple solution would be to edit the voxl-camera-server config file and grayscale the image, change framerate to ~1-2fps, etc., but that still is capable of jamming the network if the drone gets too far away or something
Would it be possible to build this 'listening' functionality directly into my mpa_to_ros node, and if so where would I change this? I've looked through the source code on github but still can't form a general understanding of how it all works. -
Here is the code where the frame is published via ROS https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros/-/blob/master/catkin_ws/src/src/interfaces/camera_interface.cpp#L91
I'm not aware of a way to flow control ROS packets. You may need to come up with your own method to do so, or ask the ROS folks if there is a way to flow control.
Another thought would be to JPG compress the frames before sending over ROS. You could still jam up the netowrk, but at least it would happen less frequently
-
Looks like ROS supports the CompressedImage format