How to guide: Mission Planner on Raspberry Pi

I tried to perform a firmware update on a quad (AC 4.1.Beta from the .DEV) using MP running in Raspian. I kept getting an error when I tried to upload the firmware to the quad that the pi couldn’t find the port. Other than the firmware update, this quad connects to the pi just fine. Is it possible to perform Ardupilot firmware updates from a Pi? (I ended up resorting to a windows machine. :frowning_face:)

Is there hid joystick support yet for rpi3 running mission planner?

Not an expert at all but I think you can search for joystick support software on the Raspberry forums. If there is then its a chance it might work using mission planner. I have not tried yet but has been considering it.

I have the rpi recognizing joystick inputs. The problem is or was that mission planner wants directx (x86 system) and linux does not support the drivers natively. This is a mission planner question

https://discuss.ardupilot.org/uploads/default/original/3X/9/5/95bd0c50624687a874857d1dcb2a9ca4a62054d7.png

1 Like

Thank you to @Holly918 for putting the guide together and all the work you put in and @Michael_Oborne for the guidance. We put together a Ground Control Station with a Rpi4 at its core, running MP and online dashboard for onboard IoT/MQTT environmental sensors. The main reason we went with Rpi4 is the ability to run dual monitors, however we ran into a roadblock when turning off OpenGL as you can only use one monitor. As Michael O. noted, you can use the LIBGL_ALWAYS_SOFTWARE=1 environment parm however that would be universal (also believe others ran into problems with that). After digging around and finding an old post on Reddit we found a workaround to use this parm flag by app (MP only) and OpenGL can run on all other instances.

Use the desktop shortcut file that Holly918 lists in their guide, however change this one line:

Exec=env LIBGL_ALWAYS_SOFTWARE=1 mono /home/pi/MissionPlanner-latest/MissionPlanner.exe

*Note if you are using an explicit version instead of ‘MissionPlanner-latest’ then change that section to your version.

That did the trick for us, leaving OpenGL enabled, now we can run MP on one screen and webpage dashboards on the other. We also have UDP working over Zerotier VPN and UAVCast. Note: We encountered a problem with gstreamer, once we installed that MP would crash constantly. Even after removing gstreamer and its dependencies we still had problems so just started with a fresh install of Raspbian OS on a 32GB SD card. Our USV has a RaPi3B+ and our GCS is using the RaPi4 2GB version. When we first connected via UDP we were having problems with the map rendering however after rebooting we are now able to zoom all the way in to the max limit.

We will revisit the gstreamer issue later but will be moving on for now as we have separate android tablets to use for live video as a workaround. Mission creep has already dragged this on long enough, moving on to actual live missions.

Thanks again, much appreciated!

Edit: credit to reddit /u/magick_68 for his fix here: https://www.reddit.com/r/Crostini/comments/f0g9d3/disable_gpu_acceleration_per_app/ They found that tip on some other nameless thread.

1 Like


I am unable to get it working on Pi Bullseye OS, it was okay for Pi Busters OS. image attached. MP tested is 1.3.76.
The serial port definitely is set up correctly because I can use mavproxy.py to communicate with the Ardupilot 4.1.3. log as shown below:

WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
Connect /dev/ttyAMA0,921600 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyAMA0
MAV> Detected vehicle 1:1 on link 0
online system 1
ALT_HOLD> Mode ALT_HOLD
Detected vehicle 42:100 on link 0
Detected vehicle 42:250 on link 0
AP: ArduCopter V4.1.3 (2fb939a1)
AP: ChibiOS: 45395b6a
AP: CubeBlack 002F0039 30385111 30343937
AP: RCOut: PWM:1-12
AP: IMU0: fast sampling enabled 8.0kHz/1.0kHz
AP: IMU2: fast sampling enabled 8.0kHz/1.0kHz
AP: Frame: HEXA/X
Received 981 parameters (ftp)
Saved 981 parameters to mav.parm
ALT_HOLD> ALT_HOLD> ALT_HOLD> ALT_HOLD> fence present
fence enabled
AP: PreArm: Hardware safety switch
AP: PreArm: Battery 1 below minimu

1 Like

Thanks for the insight. I should definitely update the guide, as more and more complaints are coming through that it’s not properly working anymore.

It could take some time though, as I’m not really using the pi anymore as a groundstation.

I also had trouble with Bullseye. I ended up going back to Buster to get it to work.

1 Like

If the Raspberry pi OS arm64 is being used, is needed to use the following commands to install mono:

sudo apt install apt-transport-https dirmngr gnupg ca-certificates
 
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
 
echo "deb https://download.mono-project.com/repo/debian stable-buster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
 
sudo apt update
 
sudo apt install mono-complete
1 Like

Thank you @Holly918 for this guide

I was so excited to find this because I am moving all the applications I use to run from a windows
laptop to my RPi4 ( RPi-400 )

Followed the instructions and did not encouter any errors, but when I click on my icon it seem
to think about it for a while ( hour-glass-prompt) but then nothing happens.

Can you suggest a log that I can go and look at to guide me to the problem?

I did go to /var/log and looked and some of the logs but could not see any clue.
So excited to get this going… when I see every one having success !!! :smile:

Many thanks

hi john, my guide is frankly a bit outdated by now. so i’d say that smaller errors are somewhat expectet.
have you tried the tips that were postet here about using buster OS instead of Bullseye and also the new commands to install mono?

Hi @Holly918

Thank you for your response.

This install was done on Buster ( Bulsseye did not go well !!! )

I missed the alternative instructions for installing “mono” …

I see the “echo” command references “debian stable-buster” and the initial doc
references “debian stable-raspbianbuster”…

I did see the post that explains that the copy of the LibskiaSharp-file is not longer required…

OK, let me redo the entire install…

Many thanks again.Will report back… hopefuly with a bigger SMILE !!

Best of luck to you. I’m not really into raspberry pi at the moment, so to try and recreate the many errors reported here (and update the guide), I’d have to set up my raspberry and take a few days of time. Unfortunately I can’t really estimate when I’ll have enough time to do this.

Until than I’m hoping that the people that hot it up and running might help out here :slight_smile:

Good evening all

I have tried this twice now with the same result.

RPi-4 (4G)
PRETTY_NAME=“Raspbian GNU/Linux 10 (buster)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“10”
VERSION=“10 (buster)”
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

Followed the guide.

To install mono, the commands I used were ( as per this thread)
sudo apt install apt-transport-https dirmngr gnupg ca-certificates

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

echo “deb Index of /repo/debian stable-buster main” | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

sudo apt update

sudo apt install mono-complete

During the install process I get no errors and yet if I double click on my ICON and select
EXECUTE, the prompt goes to an hour-glas for a while and then just does nothing.

If I look at everyone having success, it is rather frustrating.

Does anyone perhaps have any suggestions ?

Many thanks in advance

I can confirm that Mission planner works quite well with RASPI3b+. But MP being installed on a computer in the same Raspi network…There is no point having MP on a Raspi where the screen size will be small.!! …Ardupilot SITL is installed on the Raspi3b+ and MP connects well via Wifi …

bro ı use raspberry pi 4 4gb and I couldn’t open the mp . Have you found a way ?

Guys I got this problem when ı try to install mono “Ignoring file ‘monoofficial-’ in directory ‘/etc/apt/sources.list.d/’ as it has no filename extension” please help me

Which pi OS version are you using. I think latest PiOS bullseye not working a few month back. Buster is okay or python 2.x is okay, I can’t remember.

But after install successfully MP in Pi I find it not useful, we can just use Android + MP + Radio telemetry probably to fulfill the same thing.

The challenge I find is dronekit stops progressing and I haven’t get an alternative to work with Pi and arducopter to explore application onboard.

1 Like

I couldnt get MP to work on latest updated R Pi 400 (pi 4 in a keyboard)
There was an error related to LibSkiaSharp.so which I couldnt easily resolve myself.

So I cheated!
I installed Ubuntu LTS for the rpi
I did these as a matter of course:
sudo usermod -a -G dialout $USER
sudo apt-get remove modemmanager -y
Installed mono-complete as per instructions
Unzipped latest MissionPlanner to /home/{me}/MissionPlanner
Created the MissionPlanner.desktop file using alacarte (Main Menu)

Most things seem working, reviewing logs, installing firmware
But I do have the occasional crash - I’ll check for reasons and update here

4 Likes