You can run ArduPilot on Raspberry Pi 2, 3 or 4 with Navio. The autopilot's code works directly on Raspberry Pi. For ArduPilot to work properly please use the configured Raspbian distribution that we provide.
Emlid Raspbian has preinstalled ArduPilot. It includes all vehicles and is based on the most stable branch available. Currently these are:
- ArduCopter: 4.0.3
- ArduPlane: 4.0.5
- ArduRover: 4.0.0
- ArduSub: 4.0.1
Once you ssh into Raspberry Pi you'll be greated with a message that looks like this:
We'll guide you through what's going on under the hood in the sections below.
For launching ArduPilot we are using
systemd init system which provides manager for all services and processes.
The main command used to control systemd is
systemctl. Some of its uses are:
- examining the system state
- managing the system and services.
man systemctl for more details.
To select the vehicle that would be launched by default you should configure it with emlidtool:
Before configuration emlidtool checks your RCIO firmware and will suggest to update it if you have the outdated one:
In the example below we'll use arducopter but it could've been just as well arduplane or ardurover. Once the command is running, it will produce the output like this:
At this point you should enter the right choices in the left menu corresponding to your vehicle and frame. Also, you need to decide whether you want to get ardupilot enabled on boot or not and start/stop it now.
Let's assume that we have arducopter, and we've decided to enable it on boot and start.
After clicking the 'Apply' button ArduPilot will be configured and you'll see the changes in the ArdupilotInfo widget:
Open the file:
Here you can specify IP of your ground station.
All lines marked '#' are comments and have no effect.
For example, you'll need to modify TELEM1 to point to your IP like this:
Where 192.168.1.2 is the IP address of the device with the Ground Control Station - your laptop, smartphone etc.
You can add additional options to
ARDUPILOT_OPTS that are then passed to ArduPilot by adding new
TELEM environment variables like this:
ARDUPILOT_OPTS="$TELEM1 $TELEM2 $TELEM3"
Mapping between switches and serial ports (TCP or UDP can be used instead of serial ports):
- -A - serial 0 (always console; default baud rate 115200)
- -C - serial 1 (normally telemetry 1; default baud rate 57600) 3DR Radios are configured for 57600 by default, so the simplest way to connect over them is to run with -C option.
- -D - serial 2 (normally telemetry 2; default baud rate 57600)
- -B - serial 3 (normally 1st GPS; default baud rate 38400)
- -E - serial 4 (normally 2nd GPS; default baud rate 38400)
- -F - serial 5
Additionally take a look at list of serial parameters for Mission Planner.
When using UART for telemetry please keep in mind that serial ports have default baud rates.
If you changed something in the previous step you need to reload configuration for systemd to work properly.
Now you can start ArduPilot:
To stop the service run:
To automatically start ArduPilot on boot you need to enable
To disable the autostart:
You can check is ArduPilot already enabled or not:
Windows only ground station. It is the most feature complete, though. It can be downloaded from the firmware.ardupilot.org.
A crossplatform ground station for Mavlink-based flight stacks (like Ardupilot). It can be downloaded from the qgroundcontrol.com.
APM Planner is a ground station software for ArduPilot. It can be downloaded from the firmware.ardupilot.org.
APM Planner listens on UDP port 14550, so it should catch telemetry from the drone automatically. Also, if you are using Linux, you have to add your user to dialout group:
MAVProxy is a console-oriented ground station software written in Python. It’s well suited for advanced users and developers.
To install MAVProxy use Download and Installation instructions.
To run it specify the --master port, which can be serial, TCP or UDP. It also can perform data passthrough using --out option.
Where 192.168.1.2 is the IP address of the GCS, not RPi.
Navio is supported in ArduPilot upstream and if you'd like to build the binary yourself please proceed to the Building from sources. Also you can download the latest stable binary files from ArduPilot buildserver. To download arducopter binary:
In case of use helicopter, change tail of the link. For example
/navio2-heli/arducopter-heli. Supported vehicle types are listed below:
If you want to launch a custom binary you're expected to modify and use /etc/systemd/system/ardupilot.service
The comments speak for themselves. The only thing you need to adjust is
to something like this
Other than that the launching procedure is no different than the one described above with the only exception that you need to use systemctl utility with
ardupilot service instead of
ardurover and use
The command below will start custom ArduPilot binary and then mark it to launch on boot: