If I wanted to write a program using OpenCV to analyze camera feed or if I wanted to send mavlink commands to control the robot. Would it make sense to host these programs on the Raspi + Navigator or on my actual laptop instead?
It depends what kinds of features you want to extract, how complex the model is, and at what frame rate you want to run. The Raspberry Pi 4 is not very performant with large models or when decoding video. You’ll (generally) get more performance on the topside computer. As long as you aren’t worried about operating off-tether you could do the processing topside and send commands back to the robot. If doing all processing on the robot (off-tether or BlueBoat, for example) is a requirement I recommend replacing the Pi with something more performant or at least augmenting the Pi with a ML accelerator like a Google Coral.
I’d experiment with the Pi first and then see if you need to increase performance.
If I run BlueOS and Ardusub on the Pi, how would I run programs on the Pi with BlueOS and Ardusub? I’m pretty new to the Pi ecosystem, I understand running Raspian and loading a script.
You can run either as a BlueOS extension (Docker container) or run on the underlying Raspberry Pi OS just like any other Pi 4.