Send Commands from ArduSub to Python Script on an additional Raspberry Pi

So I’ve got a BlueROV2 in pretty much standard stock configuration plus WaterLinked GPS system. In the payload skid I have a second 4" enclosure that is running an additional raspberry pi that controls a supplementary camera system. Without getting too bogged down in the details of it all, my ideal situation is to have the BlueROV2 run transects using the GPS (yes, I know the GPS flight modes are still in development - I’m about to put it in the water today and run a bunch of testing). I am wondering if it possible for the BlueROV to send a command to my supplemental Raspberry Pi at the start and end of each transect. I have a python script on the raspberry pi there that normally expects input from a GPIO pin (a on/off switch) or the press of a button on my GUI.

I’ve never dealt with this sort of communication before so am not sure how to set it up. Clearly, the supplementary Pi needs to be listening for the command. Does anyone have any big picture suggestions on how I would go about incorporating this? I’m assuming it is something through MavLink but I’m not totally versed in QGC and ArduSub yet.

Thanks!

MAVProxy is a tool running on the ROV that relays all of the communications between the ROV and external applications. You should add an output link to MAVProxy to connect it to your second Pi:

--out=udp:<second pi IP>:<port>

You can do this at http://192.168.2.2:2770/mavproxy

Then on the second Pi, you can connect to that <port> with pymavlink.

ArduSub emitsthis message every time a waypoint is hit.

Excellent. So if I wanted to do a grid survey, what would be the best approach? I see QGC has a mission planner that includes a grid survey function. Would it be best to use that (which appears to be very much drone focused) or would it be best to create a custom script with pymavlink that sends waypoints?

Thanks for the guidance Jacob.