Comment on page
Airframe Setup in Software
Basic integration of the Skynode onto your own custom airframe
In PX4 the airframe file does mainly two things:
- 1.Load pre-defined parameters: Pre-defining parameters is convenient for setting up a large number of the same aircrafts. This step is optional as parameters can also be set manually over AMC
- 2.Load mixer files: Mixer files specify the mapping of control inputs to motor and servo outputs. You need a mixer file which fits the geometry of your airframe before you can fly.
- Your airframe is supported: In this case you do not need to write your own airframe file because mixer definitions for your airframe already exist. You can go ahead and mount your Skynode on your craft, then choose the correct airframe type in AMC and proceed to bench testing. You can later still integrate your custom parameter settings in your own airframe file to simplify the bring up of further units.
- Your airframe is not supported: This means that no mixer definition for your airframe type exists. You have to write a custom mixer file and load it as part of a custom airframe file before you will be able to fly. Refer to the example below on how to proceed.
For the sake of this example we will create and load a custom mixer for a quadrotor airframe, even though the Quadrotor configuration is a regular airframe already supported by PX4.
Mixer files named .main.mix will be loaded to the IO controller which correspond to the PWM outputs on the secondary breakout board on Skynode.
Mixer files named .aux.mix will be loaded to the FMU controller which correspond to the PWM outputs on the primary breakout board on Skynode.
For the X500 airframe the mixer file could look like this:
S: 3 5 10000 10000 0 -10000 10000
S: 3 6 10000 10000 0 -10000 10000
The following outputs are set to their disarmed value
during normal operation and to their failsafe falue in case
of flight termination.
Multirotor mixers require a specified geometry, in this case 4x. Supported geometries can be found in the open-source PX4 Firmware. Geometries specify the ratio of the motor placements on the airframe. If you cannot find a geometry which fits your airframe (e.g. if your aircraft is asymmetrical), please contact Auterion for support. Custom geometries are currently not supported as they are compiled as part of the Firmware.
A custom airframe file for the x500 could look like this:
set MIXER x500
set PWM_OUT 1234
if [ $AUTOCNF = yes ]
# Sensor parameters
param set-default CAL_MAG1_ROT 30
The name of your airframe file must be of the format <unique_id>_<name>, e.g. 1300001_x500. The unique_id will allow you to load the airframe later by setting the parameter SYS_AUTOSTART:
param set SYS_AUTOSTART 1300001.
- 2.Save your airframe file as
- 3.Save your mixer definition file as
- 4.Edit the file
aepx4-developer-tools-2.x.x/fmu/configand add your custom airframe there:rc.autostartif param compare SYS_AUTOSTART 1300001thensh /fs/microsd/ext_autostart/airframes/1300001_x500fi
- 6.Package your new image by executingcd aepx4-developer-tools-2.x.xmake package-update version=x500-test artifactPath=<AEPX4 Release>.auterionos
- 9.Reboot your vehicle to perform the pa.
- 10.Check in the mavlink shell if your mixer was loaded correctly by entering the command
dmesg. It should show a line like this:INFO [init] Mixer: /fs/microsd/ext_autostart/mixers/x500.aux.mix on /dev/pwm_output1
- 11.check you PWM settings with the following command:
pwm info -d /dev/pwm_output1For servos the PWM rate should be 50Hz and the disarmed value around 1500msFor motors the PWM rate should be 400Hz and the disarmed value around 900ms.You can change the disarmed PWM value on a per channel basis by editing the parameters PWM_AUX_DIS* and PWM_MAIN_DIS* for the primary and secondary outputs. You can change the PWM rate over the parameters PWM_RATE and PWM_AUX_RATE
- 12.ATTENTION: REMOVE THE PROPELLERS BEFORE PROCEEDINGCheck if you motors and servos move correctly. These commands will make your servos and motors move by directly setting the PWM outputs.
pwm test -d /dev/pwm_output1 -c 56 -p 2000 (to test servos)
pwm test -d /dev/pwm_output1 -c 12 -p 2000 (to test motors)