Is it possible to run a raspberry pi with BlueOS and another raspberry pi running ardupilot? With the BlueOS pi accessed by Cockpit from the topside computer? If so, how would I connect the two pis? I have a very basic ROV running on a pi running just a python script and would like to use BlueOS, but it looks like it needs an ardupilot?
Hi @cfoste -
Welcome to the forums!
BlueOS is intended to run ArduPilot internally, using the external sensors and GPIO of the Navigator. Alternatively, ArduPilot can be run on an external autopilot like a Pixhawk, but you’ll lose the ability to run LUA scripts.
So, two Raspberry Pi are defnitely not required! You will need an autopilot of some sort to connect to BlueOS, which will route its communications to your Cockpit instance topside.
It sounds like you’re running your own autopilot code, rather than ArduSub? Does it communicate via MavLink?
Thanks for the info! So right now I have a raspberry pi running a rpi camera, external motor controller, and a handful of sensors. The rpi is running a python code with a custom tkinter gui and I am remoting into it from my topside computer. I really like BlueOS/Cockpit so I would like to use it with my existing hardware. Is this possible? Or do I really need a specific autopilot board? (I have a spare rpi, which is why I thought one running ardupilot and one with BlueOS.) Or can ardupilot and BlueOS run simultaneously on a single Rpi?
Hi @cfoste -
It might be possible, but it would take quite a lot of work!
Cockpit needs to communicate with an autopilot, typically ArduPilot, via MavLink Server and MavLink Camera Manager. You can read about that here.
Every BlueROV2 (and BlueBoat) has BlueOS running Ardupilot within it - it is one of many BlueOS services that combine to make managing your vehicle easy. You’ve developed your own ROV software architechture, but because you didn’t use ArduSub, it isn’t going to be a quick process to get it talking to Cockpit… but you could potentially make it talk the same MavLink messages as an ArduPilot based system!
Hi @cfoste, welcome to the forum
ArduPilot is a family of autopilot firmware - our ROVs run the ArduSub variant. BlueOS doesn’t require an ArduPilot- (or PX4-) compatible flight controller board to be connected, but several BlueOS services at least expect some kind of autopilot that communicates using MAVLink, so if your setup doesn’t provide that then you would have quite limited functionality with BlueOS, and you wouldn’t be able to run Cockpit.
It is possible, but as @tony-white mentioned it may involve a fair amount of work.
- The most cohesive approach would be to implement your setup in ArduPilot’s hardware abstraction layer (similar to how we added Navigator support), which you could then use to build a custom ArduSub firmware. From there you could add detection support for it in BlueOS, and it could be used like any other supported flight controller board.
- For context, our Navigator is essentially a collection of sensors and other peripherals - unlike an independent flight controller board (like a Pixhawk), the autopilot firmware runs on the Raspberry Pi (in BlueOS), using the hardware provided by the Navigator
- Alternatively you could implement your own autopilot code within BlueOS, either using one of the existing development Extensions, or (/later) as your own Extension, possibly presenting itself to BlueOS as an unknown autopilot platform (if you integrate MAVLink communication), with the caveat that it may still be challenging to integrate with some of BlueOS’s other services
- If you want to keep your separate Raspberry Pi as a faux flight controller board then to connect that to BlueOS you’d mostly need to get it talking MAVLink
We don’t have great documentation on any of those approaches, and while I’d be interested in writing some I have some other higher priority docs to write at the moment. I’ve raised an Issue in the meantime, so it doesn’t get forgotten about
Thanks for all the great information! So it sounds like I can get away with using one RPi running both Ardupilot and BlueOS. It sounds like the easiest way is to add my custom build to the ardupilot HAL and update all the other references in ardupilot. Once I get that working I’ll try to get BlueOS talking to it via MAVlink UDP port. Does that sound like it might work?
Indeed.
With the Navigator, BlueOS is responsible for running the ArduPilot autopilot firmware once it detects the board is connected, as part of its autopilot manager service
Kind of, but it depends what you mean. If BlueOS is running the autopilot then it will also automatically make an internal MAVLink connection to the firmware process. You can then use external services to communicate with it through your endpoint(s) of choice (configured through the MAVLink Endpoints page).