Presenting: Parasect!

Hello everyone!


I’m proud to present Parasect, a parameter management tool, developed within Avy and released as free and open-source!

Parasect has two-fold capabilities:

  • Compares two parameter sets and highlighting their differences.
  • Parses from user-defined content and generates new parameter sets, ready for loading into an autopilot.

You can install Parasect via pip from PyPI:

pip install parasect

Parasect is primarily used as a command-line program. In its simplest form, two parameter files can be compared via:

parasect compare <FILE_1> <FILE_2>

for example,

❯ parasect compare file_1.params file_2.params
File comparison : file_1.params | file_2.params
Component 1-1:
COM_FLIGHT_UUID : 228           | 230          
EKF2_MAGBIAS_X  : -0.0112       | -0.013       
EKF2_MAGBIAS_Y  : 0.0289        | 0.0269       
EKF2_MAGBIAS_Z  : 0.0164        | 0.0142       
FW_AIRSPD_TRIM  : 15.0          | 16.0         
FW_R_LIM        : 40.0          | 50.0         
LND_FLIGHT_T_HI : 24            | 25           
LND_FLIGHT_T_LO : 666359744     | 1388132480   
VT_FW_QC_R      : 60            | 65           
9 parameters differ

The usage for building parameter sets is more involved. Please see the Command-line Reference for details.

Additionally, it exposes a minimal API, enabling automated operations. This is described in the API Reference.

You can find more information in the Github repository (GitHub - AvyFly/parasect: Parameter management tool for autopilots) and full documentation at Read the Docs (Parasect documentation).

I hope it will be as useful to you as it has been for us!


Thanks for sharing @Georacer it’s a great tool I’m sure a lot of developers will find it very useful

1 Like

That’s cool @Georacer - are the param files just the default output you get if you run the following?

param save

I just updated the airframe docs to suggest that when adding a new airframe you start from a generic frame, then set control allocation, then do tuning. You can then run param show-for-airframe to get the airframe config file you can put in an SD card.

This sounds more flexible, but wondering what cases you use it for?

If it makes sense to you, we could perhaps at least link it from Parameters & Configurations | PX4 User Guide

Ooh boy, that is one late answer I’m going to give you. Sorry about that, I don’t track this forum very closely.

When it comes to comparing parameters for PX4, Parasect accepts the format as saved by QGC (Parameters → Tools → Save to File).

I didn’t know about the param save console command. I spun up a simulation and tried
param save /home/_username_/myparams
and what I got was a ASCII/Binary file that I’ve never seen before:

I don’t know what one is to make of this or how it is useful, but as usual, a ticket with an issue request in Parasect is always welcome.

I did try the param show-for-airframe command and I got an output like this:

param set-default COM_FLTMODE1 0
param set-default IMU_INTEG_RATE 250
param set-default PWM_AUX_OUT 1234
param set-default PWM_MAIN_OUT 1234
# Make sure to add all params from the current airframe (ID=10016) as well

which looks like all the parameters changed from the ones as provided by the airframe file but also in a format where it makes easy for you to append the changes to the airframe file.

This is definitely useful. Parasect can however provide some other uses:

First, it can compare two parameter files (as exported by QGC) and tell you what changed, presenting the values before and after:

File comparison : my_original_params.params | my_new_params.params
Component 1-1:
BAT1_V_CHARGED : 4.1                       | 4.0                 
BAT_V_EMPTY    : 3.4                       | 3.3                 
2 parameters differ

Note that this allows comparing between any two parameter snapshots, not only between the current state and the defaults.

Additionally, once you know the changes you want to make (after tuning etc), you can ask the Parasect build functionality to create an airframe file for you.

I hope this answers some of your questions, which to be perfectly honest, I’m not sure I completely understood.

Maybe after a bit more of a discussion I could answer you if Parasect merits a mention in that wiki page you mentioned. I think it is definitely useful for semi and full-professional users, but maybe not for the typical hobbyist.

Adding a mention @hamishwillee, since this is such a belayed reply.