For my new aerial photography copter design I’m working on, I want to provide all the features that users have come to expect including OTA firmware updates, automatic upload to the cloud of logs, images and videos, visual-follow-me, high altitude non-GPS in case of GPS failure, remote control over LTE telemetry, etc. For many of these the ArduPilot team has already developed solutions but they require a companion computer so we’ve struggled to roll them out to users.
This led me to BlueOS which was originally written for submarines and boats but which @williangalvani and other developers have been happy to extend to support other vehicle types. It already includes many of the features we need including the Cockpit GCS but perhaps more importantly it supports Extensions (based on Docker) which allows us to safely and somewhat easily extend its functionality.
To test it out I wrote a simple Camera Download extension which takes AP’s existing Siyi and XFRobot download scripts and makes them available within BlueOS so any users can now install them via the BlueOS Extensions page.
He’s a picture of the downloader in action while connected to a Siyi A8.
How to get Involved
If you’re interested in getting involved I highly recommend reading BlueOS’s Extensions documentation and get familiar with Docker.
Here are some BlueOS extensions that I’m keen to have developed and so I can mentor developers and/or help them get through the development, review and release process:
- Visual Follow Me
- High Altitude Non-GPS perhaps using optical flow
- Precision Landing using April tags
- Publish vehicle position to cloud
Hardware
Re hardware, at the top you’ll see a simple wiring diagram of the major components of my vehicle and they’re all connected via ethernet
- CubePilot CubeOrangePlus
- DroneNet ethernet switch (and integrate Serial->Ethernet bridge). I’ve also successfully tested the CubeNodeETH and CubeLan 8-port switch.
- Siyi A8 camera or alternatively the XF Robot Z-1 mini (I’ve tested with both)
- Ochin v2 carrier board and RPI4 CM or RPI5 CM (I’ve tested with both)
Installing BlueOS on RPI4 or RPI5
If you’re interested in setting up something similar yourself, Official RPI4 CM setup instructions are here but below is also how I do it:
-
Purchase an RPI4 I/O board or RPI5 I/O board
-
Install rpiboot and rpi-imager on your Ubuntu or Windows PC
- Ubuntu users should run
- sudo apt install rpiboot
- sudo apt install rpi-imager
- Windows user instructions are here but in short you should:
- Ubuntu users should run
-
On the RPI I/O board
- Mount the RPI4/5 CM on the RPI I/O board
- Added jumper so the RPI CM essenetially goes into bootloader mode, “Fit jumper to disable eMMC Boot”
- Connected I/O board to PC via USB
- Powered up the I/O board (if using the RPI5 I/O board this step is probably done by the above step)
-
On your PC
- Open a web browser to the BlueOS release page, select a recent release, open “Assets” and download “BlueOs-raspberry-linux-arm64-v8-bookworm-pi5” (if this image isn’t available, pick a different release)
- run rpiboot:
- Ubuntu users should open a terminal and enter “rpiboot”
- Windows users should open the start menu and run “rpiboot-CM4-CM5 Mass Storage Gadget”
- run rpi-imager:
- Ubuntu users should open a terminal and enter “rpi-imager”
- Windows users should open from start menu run “Raspberry Pi Imager”
- from within RPI Imager:
- Choose Device: “Raspberry Pi 4” or “Raspberry Pi 5”
- Operating System: Use custom, select downloaded BlueOS .img file
- Storage: select RPI drive (should have appeared after rpiboot was run)
- Select “No” when asked to apply special settings
Configuring BlueOS
After the above installation is complete this is how I perform the initial setup of BlueOS
Configure RPI/BlueOs to connect to your local Wifi:
- Leave the RPI4/RPI5 on the I/O board initially
- Make sure a Wifi antenna is attached to the RPI4/RPI5 CM
- Remove the Jumper and power-down/power-up the I/O board so the RPI boots normally
- Connect a PC via ethernet to the I/O board’s ethernet port
- Set the PC’s IP address to manual with IP 192.168.2.100 (the RPI’s default IP address is 192.168.2.2 and we want the PC to be within the same ethernet subnet)
- Open a Chrome browser to http://192.168.2.2, BlueOS should appear
- A setup wizard should appear, select “Other vehicle setup”
- Vehicle Name: MyCopter
- MDNS Name: “blueos” (default)
- On the top right, select the wifi icon and connect to your local Wifi
Configure RPI/BlueOs’s Ethernet IP to be the same subnet as the autopilot and camera:
- Push the buddha icon on the top right and change to “Pirate mode”
- Select the networking icon
- select “eth0”
- select “ADD STATIC IP” and enter 192.168.144.20 (this will be the RPI’s IP address on the vehicle)
- select “DISABLE DHCP SERVER”
- beside “192.168.2.2 Static IP” push the trash can icon. At this point you will lose contact with BlueOS but you can re-gain contact by changing the PC’s manual IP address to 192.168.144.100 and reconnecting with the web browser to http://192.168.144.20
- restore PC’s IP address to automatic
Connect RPI/BlueOs to Autopilot and Camera:
- Follow AP wiki instruction to setup DroneNet. This should result in these IP addresses for other components:
- DroneNet/CubeNodeETH: 192.168.144.14
- Autopilot: 192.168.144.15
- Siyi a8: 192.168.144.25
- On the autopilot, create an addtional UDP Server connection for BlueOS to connect to:
- NET_P1_TYPE = 1 (UDP server)
- NET_P1_PROTOCOL = 2 (MAVLink2)
- NET_P1_IP0 = 0
- NET_P1_IP1 = 0
- NET_P1_IP2 = 0
- NET_P1_IP3 = 0
- NET_P1_PORT = 14560
- Install the RPI on the Ochin carrier board
- On the PC open a Chrome browser to http://blueos-avahi.local/ (BlueOS should appear)
- Open BlueOS’s Autopilot Firmware screen
- select “Master Endpoint”
- Connection Type: UDP Client
- IP/Device: 192.168.144.15
- Port/Baudrate: 14560
- push “Save Changes” - Check top-right Hearbeat icon has gone white meaning the RPI and autopilot are communicating via MAVLink over ethernet
Setup Cockpit Video Streaming
- open BlueOS’s Video Streams page
- under “Redirect Source” select, “ADD STREAM”
- Stream nickname: “Siyi A8”
- Select “RTSP” from drop-down on bottom left
- Stream endpoint: rtsp://192.168.144.25:8554/main.264 (see valid RTSP address for Siyi cameras here: SIYI A8, ZR10, ZR30, ZT6 and ZT30 Gimbals — Copter documentation)
- Press Create
- after a few seconds the live video thumbnail should be displayed
- under “Redirect Source” select, “ADD STREAM”
- Open Cockpit, push arrow on right-middle of screen to open left menu
- Select Settings, Video
- under “Streams mapping”, set “External name” to “Siyi A8” (set above)
- under “Allowed WebRTC remote IP Addresses” delete IP address and leave “Enable auto-retrieval of allowed IP addresses” checked
- re-open left menu, select “Edit Interface”
- from bottom scroll bar, drag-and-drop “Video Player” onto the map
- video should appear but if not:
- find “VideoPlayer” from top-left menu, select gear icon
- set “Stream name” to “Stream 1”
- Select Settings, Video
Known Issues
It’s still early days for BlueOS with Copter so there are a number of known issues we need to resolve including:
- Routing the camera’s live video stream to a regular ground station (QGC, MP) hasn’t been confirmed to work yet
- Cockpit’s missing features that QGC, MP have including camera gimbal controls, EKF status viewer and many mission commands
Videos
Willian’s BlueOS intro
Rafael Lehmkuhl’s Cockpit intro
Patrick Pereira’s MAVLink Tools
Thanks for reading this far and special thanks to BlueRobotics and the BlueOS development team!