Link Search Menu Expand Document

VOXL 2 PX4 Developer Guide

Table of contents

  1. Preface
    1. Introduction
    2. For the PX4 Developer
    3. Key PX4 Differences to Note
    4. Block Diagram - Details
  2. Component Walkthrough
    1. Processors
    2. Onboard Sensors
    3. External Sensors and Interfaces
    4. Software Interfaces
    5. Image Sensor Interfaces
  3. Common Use Cases
    1. View uORB Data
  4. Source Code

Preface

This guide is geared towards someone interested in all the bits and bytes that make PX4 on VOXL 2 work. If you are looking instead for a general user’s guide, please refer to the VOXL 2 PX4 User Guide

Introduction

VOXL 2 is a flight controller that runs PX4. On VOXL 2, it runs flight critical parts of PX4 software on a real time DSP, and other parts in Ubuntu 18.04 Linux on an 8 core 64-bit ARMv8 processor.

Typical of other flight controllers, there are connectors for external sensors, power, and ESC actuation. There are sensors like IMUs and barometers, file systems for logging flights, and interfaces for connecting to ground control stations.

But unlike most other flight controllers, PX4 is actually also running in a companion computer with that is capable of doing things like stream 7 image sensors simultaneously for computer vision and support multiple data links like 5G. Although we will use the companion computer as a “front end” in some of the instructions below, the other guides here (TODO) contain more detailed usage of that part of the system.

For the PX4 Developer

If you are a PX4 developer who is used to developing on microcontollers. On VOXL 2:

  • PX4 is installed using apt package manager (see boards/modalai/rb5-flight/debian/DEBIAN/ to see how)
  • Connection to QGC is over IP, not USB or serial
  • The Non-RTOS parts of PX4 run in Ubuntu 18 (on the applications processor), these are defined boards/modalai/rb5-flight/default.cmake, and can be built in a docker container available here
  • The RTOS parts of PX4 run in an RTOS called QuRT (on the sensors DSP), these are defined boards/modalai/rb5-flight/qurt.cmake, and can be built in the same docker container available here
  • PX4 gets installed via the VOXL SDK (aka voxl-suite), and this guide is meant to allow users to customize this component
  • The ‘guest OS’ firmware that runs in the sDSP is included in the system image, providing access to the drivers for UART/I2C/SPI etc.
  • When you are connected to VOXL 2’s shell, all the normal PX4 command (like listener) get a px4- prefix, e.g. to use the listener command, try px4-listener

Key PX4 Differences to Note

  • Currently, there’s no connection from QGroundControl to PX4 through the USBC connector
    • The USBC connection provides ADB access only, which brings you to a shell and you can interface with PX4 command line from Linux
  • Communications from VOXL 2 to the ground station are over IP. Please see the Connecting Quickstart

Block Diagram - Details

The following provides details about the architecture:

m0054-px4-block-diagram View in fullsize

Component Walkthrough

Processors

IDNameDescription
AM0054 or VOXL 2The entire PCBA, containing the QRB5165M SIP, sensors, connectors, etc.
BQRB5165MThe system in package (SIP) populated on M0054 containing all the processors listed below
Cspli_proc or sDSPSensors DSP (dDSP) - Hexagon V66 - also called Sensors Low Power Island (slpi)
  runs PX4 code built for Qualcomm’s Hexagon DSP RTOS (QuRT) specified in qurt.cmake
Dapps_procCPU, Applications Processor, 8-core 64-bit ARM v8. Ubuntu 18.04, Kernel 4.19
  runs PX4 code built for Linux/POSIX specified in default.cmake
 aDSPAudio DSP (aDSP) - Hexagon V66, not used by PX4, not shown on graphic
 cDSPCompute DSP (cDSP) Hexagon V66Q - not used by PX4, not shown on graphic
 GPUQualcomm® Adreno™ 650 - not used by PX4, not shown on graphic
 NPUQualcomm® NPU230 - not used by PX4, not shown on graphic

Onboard Sensors

IDNameDescription
E - U16IMU0 (slpi)ICM-42688p ([src/drivers/imu/invensense/icm42688p])
E - U17IMU1 (apps_proc)Coming soon, HW onboard. ICM-42688p ([src/drivers/imu/invensense/icm42688p])
E - U18BARO0 (slpi)BMP-388 ([src/drivers/barometer/bmp388])
E - U19BARO1 (slpi)ICP-10100 ([src/drivers/barometer/icp10100])

External Sensors and Interfaces

For detailed pinouts, please reference the VOXL 2 connectors page.

IDNameDescription
F - J19RC UARTfor example Spektrum
F - J19GNSS UARTfor example Ublox Neo-M8N
F - J19MAG I2Cfor example IST8310
F - J19Future I2Cnot yet available
F - J18UART ESCUART for ModalAI 4-in-1 ESC ([src/drivers/uart_esc/modalai_esc])
F - J4Power Module I2CI2C for ModalAI Power Module ([src/drivers/power_monitoring/voxlpm])
F - J10External SPIFuture
F - J9USBCadb connection
F - J3/J5Board to BoardFor add-on boards, USB 2.0 hub, USB 3.0 hub, UART, I2C, etc

Software Interfaces

IDNameDescription
G0libfc_sensorFacilitates UORB communication between the apps_proc and slpi_proc
G1MAVLink / IPUsing the networking stack on the apps_proc, MAVLink connections are facilitated over IP

Image Sensor Interfaces

Shown called out as Z, QTY6 4-lane MIPI-CSI2 + QTY4 CCI interfaces are available via the J6, J7 and J8 connectors. See VOXL 2 camera configs for more details.

Common Use Cases

View uORB Data

voxl2:/$ px4-listener sensor_accel

TOPIC: sensor_accel
 sensor_accel_s
	timestamp: 126098074  (0.002515 seconds ago)
	timestamp_sample: 126097753  (321 us before timestamp)
	y: -0.2508
	z: -9.7809
	temperature: 32.4728
	error_count: 0
	clip_counter: [0, 0, 0]

Source Code

The current PX4 branch is here.

To build, see the docker container project available here