Off-board control from ODROID XU4
Intro
OFFBOARD control means that the autopilot controller is commanded by some high-level controller e.g. companion computer (like ODROID or Raspberry Pi). We are going to work with PX4 autopilot. PX4 accepts the following high-level commands
- Poisition setpoints
- Velocity setpoints
- attitude (and attitude rates) + thrust setpoints
There are a number of ways to send such setpoints to the flight controller. In all ways, specific MAVLink messages are used for those setpoints.
The way that is explained here is by using MAVROS package.
You need to be familiar with ROS basics in order to complete this tutorial.
Steps
The framework works as follows,
- you will set an RC switch on your RC controller to activate/deactivate OFFBOARD mode
- once OFFBOARD mode is activated, you should already be sending setpoints at least two times per second 2Hz
- you will write a Python node that publishes setpoints to certain MAVROS topics at least at 2Hz
- MAVROS will take the published setpoints and send the appropriately to the flight controller
That is it!