top of page

Software

(n) the programs and other operating system used by a computer

Our Software Stack

Our software is divided over several different processors.  The VOXL, the Flight Core, and the ESC all have independent software stacks running on them.  In addition, the VOXL runs multiple software stacks on its multiple ARM cores, and independent firmware on its two DSPs.

What languages and frameworks do we use?

Throught this season we have created applications and scripts utilizing C/C++, python and shell scripting. We have made extensive use of Docker for creating the deployment environments running on top of the Yocto OS on the Voxl.  We made heavy use PX4.

More About our use of PX4

The Flight Core runs the PX4 firmware.  The PX4 firmware is an open source professional drone autopilot software project.  In order to support our UUV, we needed to customize the PX4 firmware.  This included creating custom airframe and mixer files to deal with the unique propulsion system on our vehicle. We also made a custom attitude module to independently control our vehicle  based on the sensor data it receives.  A large part of this attitude control came from creating an accurate MS5837 driver and utilizing the compass readings from the PNI RM3100.

 

The PX4 firmware with custom modifications was flashed onto the ModalAI Flight Core. The Flight Core runs the PX4 firmware on top of the nuttX RTOS. The drivers in the PX4 software identified sensors connected via SPI, I2C & UART. The PX4 system uses a uORB publish/subscribe messaging system. These published messages were turned into mavlink messages via the PX4 mavlink module and sent via UART to our VOXL companion computer. These mavlink messages are then read and forwarded to a Docker container, and when connected via ethernet, they are also forwarded to the ground station. 

Why the Voxl? 

 At the heart of our electronics is ModalAI’s VOXL platform.  This utilizes the Snapdragon processor with “Quad-core cpu up to 2.15GHz, a GPU, and 2 DSPs along with custom hardware acceleration blocks. This high performance companion computer is in control of the autonomous operation of the UUV.  It communicates with the ground station over a 1GBit ethernet link, when tethered, through a USB to ethernet adapter.  It interfaces to two 4K, 30 fps, high resolution cameras over high-speed MIPI interfaces for image processing and localization.  It also interfaces with the Flight Core over two 1Mbps RS-232 interfaces.  The VOXL is powered by an offboard 5V power regulator that is connected to the 16Ah, 4S LiPo battery.  A fan is used to cool the VOXL’s Snapdragon CPU.

Whats The Voxl Doing? 

 The VOXL is running Yocto Jethro Linux. It provides us the ability to use Docker to run any supported containers (e.g. any OSes that support armv8).  We choose to create a Focal Docker image (Ubuntu 20.04). This gave us access to ROS2, in particular the Foxy distro of ROS2 was used on the VOXL. Having access to ROS2 gave us the ability to leverage the px4_ros_com ROS2 package. This was ideal as the Fast DDS interface in the PX4 Autopilot can be leveraged by any applications running and linked in DDS domains” which is why PX4 developers recommend switching to ROS2. 

The microprocessor on the Furling32 4in1 ESC runs the BLHeli32 firmware.  This firmware allows setting the rotation of the motors, supports bidirectional operation, as well as many other parameters.  The maximum update rate of the motor speed is also controlled by the firmware’s communication protocol.  The Flight Core communicates with the ESC over a 1 wire interface per thruster. This ESC supports the DSHOT protocol, a digital protocol, and unlike the traditional PWM protocol, allows us to query telemetry data from the ESC (like temperature, voltage, current and RPMs).  The update rate of the ESC determines the maximum frequency of any control loop used in the propulsion system.  Anything faster than this frequency will have no effect.  We are still experimenting to determine the appropriate update rate for our propulsion system.

What Controls our Propulsion System?

bottom of page