New ArduPilot methodic configurator GUI

We created a python GUI application to edit the intermediate parameter files and upload them to the flight controller.
All GUI elements have meaningful mouse-over tool-tips. The latest documentation is embedded, It validate min and max ranges, but allows users to override them. It displays calibrations in yellow. If a reset is required because of a parameter change it automatically does it. It reads back the parameters after writing and automatically validates if the write was successful.

How can we improve it?

Installation instructions are on the project main page

ArduPilot Methodic Configurator User Manual

Overview

Amilcar Lucas’s - ArduPilot Methodic Configurator is a Python tool designed to simplify the configuration of ArduPilot drones.
It provides a graphical user interface (GUI) for managing, editing and visualizing drone parameter files, as well as writing parameters to the vehicle.
It automates the tasks described in the How to methodically tune (almost) any multicopter using ArduCopter forum Blog post

Usage

1. Select a Vehicle Directory

  • Click the ... button next to the Vehicle directory: label to open a directory selection dialog.
  • Navigate to the directory containing the vehicle-specific intermediate parameter files and click OK.
  • vehicle-specific intermediate parameter filenames start with two digits followed by an underscore and end in .param

2. Select an Intermediate Parameter File

  • Use the Current intermediate parameter file: combobox to select an intermediate parameter file.
  • The first available intermediate parameter file not named 00_default.param will be selected by default
  • If the selection changes, the parameter table will update to display the parameters from the selected file.

3. Select a Flight Controller Connection

  • If a flight controller is detected and the --device command-line parameter was not explicitly set, it will connect to it.
  • The Flight controller connection: combobox lists available connections.
  • Select a connection to establish communication with the flight controller.

4. Viewing Documentation

  • Click on the documentation labels to open the corresponding documentation in a web browser.
  • Documentation is split into four categories:
    • Blog Post - ArduPilot’s forum Methodic configuration Blog post relevant for the current file
    • Wiki - ArduPilot’s wiki page relevant for the current file
    • External tool -External tool or documentation relevant for the current file
    • Mandatory - Mandatory level of the current file:
      • 100% you MUST use this file to configure the vehicle,
      • 0% you can ignore this file if it does not apply to your vehicle
  • Hover over the labels to see tooltips with additional information.

5. Editing Parameters

  • The parameter table presents the parameters in the current intermediate parameter file
  • In the parameter table, you can edit the New Value and Change Reason entries for each parameter.
  • You MUST edit the Change Reason so that other users understand why you changed the parameter to that particular new value
  • ReadOnly parameters are presented on a read background, they should not be present in a intermediate configuration file because under normal conditions they can not be changed
  • Sensor calibration parameters are presented on a yellow background, they are vehicle-instance dependent and can NOT be reused between similar vehicles
  • Check the Write checkbox to select parameters to be written to the flight controller
  • Hover over the labels to see tooltips with additional information.
  • The entire ArduPilot official parameter documentation is available on the tooltip, no need to use a browser to search it

6. Skipping to the Next Parameter File

  • If you want to skip the current parameter file without writing any changes, click the Skip parameter file button.

7. Writing Parameters to the Flight Controller

  • You can also jump to a particular file using the combobox as explained in 2. Select an Intermediate Parameter File
  • After editing parameters, click the Write selected params to FC, and advance to next param file button to write the (Write checkbox) selected parameters to the flight controller.
  • All parameter’s New Value and Change Reason will be written to the current intermediate parameter file, irrespective of the Write checkboxes
  • The application will then advance to the next parameter file.

8. Completing the Configuration Process

Once all the intermediate parameter files have been processed, the ArduPilot Methodic Configurator will display a summary message box.
This message box provides a comprehensive overview of the configuration process, including the number of parameters that were kept at their default values, the number of non-default read-only parameters that were ignored, and the number of non-default writable parameters that were updated.

The summary message box will also categorize the writable parameters into four groups:

  • Unchanged parameters: These parameters left unchanged.

  • Non-default read-only parameters: These parameters are read-only and cannot be changed. They are typically related to system configurations that can not be modified.

  • Non-default writable sensor calibrations: These parameters are vehicle-instance dependent and cannot be reused between similar vehicles. They are typically related to sensor calibration and should be adjusted for each individual vehicle.

  • Non-default writable non-sensor-calibrations: These parameters can be reused between similar vehicles. They are not related to sensor calibration and are generally applicable to a range of vehicles with the same configuration.

After the summary message box is displayed, the application will write the summary information to separate files for easy reference and documentation. These files include:

  • complete.param: Contains all parameters contained in the flight controller.
  • non-default_read-only.param: Contains all non-default read-only parameters. You can ignore these.
  • non-default_writable_calibrations.param: Contains all non-default writable sensor calibration parameters. These are non-reusable.
  • non-default_writable_non-calibrations.param: Contains all non-default writable non-sensor-calibration parameters. These are reusable across similar vehicles.

The summary files provide a clear overview of the changes made.
Once the summary files are written, the application will close the connection to the flight controller and terminate.

Configuring

1. Configuration files

Most users will not need to configure the tool, but if you do want to do it you can.

The ArduPilot Methodic Configurator uses several configuration files to manage and visualize drone parameters. These files are crucial for the tool’s operation and are organized in a specific directory structure.

  • Intermediate Parameter Files: These files are located in the vehicle-specific directory and are named with two digits followed by an underscore, ending in .param. They contain the parameters that need to be configured for the drone. Each file corresponds to a specific configuration step or aspect of the drone’s setup.

  • Documentation File: This file provides documentation for each intermediate parameter file. It is used to display relevant information about the parameters and their configuration process. The file_documentation.json documentation file is first searched in the selected vehicle-specific directory, and if not found, in the directory where the script is located.

  • Default Parameter Values File: The 00_defaults.param file is located in the vehicle-specific directory.
    If the file does not exist, or is invalid, use this command to regenerate it

./extract_param_defaults.py bin_log_file.bin > 00_default.param
  • ArduPilot parameter documentation File: The apm.pdef.xml contains documentation and metadata for each ArduPilot parameter in an XML format.
    The file is first searched in the selected vehicle-specific directory, and if not found, in the directory where the script is located, and if not found automatically downloaded from the internet.
    The only version available in the internet ist the latest 4.6.0-DEV.
    So until that changes you need to genet´rate this file yourself for the firmware version that you want to use.

The tool uses these files to manage the configuration process, allowing users to select and edit parameters, and to write the changes back to the flight controller. The intermediate parameter files are the primary focus of the user interface, as they contain the parameters that the user can modify. The documentation files provide context and guidance for each parameter.

Command Line Usage

The ArduPilot Methodic Configurator can be started from the command line.
The command line interface provides several options to customize the behavior of the tool.

To use the command line interface, navigate to the directory where the ardupilot_methodic_configurator.py script is located and run the script with the appropriate arguments.

Here is a list of command line options:

  • --device: The MAVLink connection string to the flight controller. It defaults to autoconnection to the first available flight controller.
  • --vehicle-dir: The directory containing intermediate parameter files. Defaults to the script directory.
  • --n: Start directly on the nth intermediate parameter file (skips previous files). Default is 0.
  • --loglevel: The logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL). Default is INFO.
  • -t or --vehicle-type: The type of the vehicle. Choices are ‘AP_Periph’, ‘AntennaTracker’, ‘ArduCopter’, ‘ArduPlane’, ‘ArduSub’, ‘Blimp’, ‘Heli’, ‘Rover’, ‘SITL’. Defaults to ‘ArduCopter’.

Example usage:

python ardupilot_methodic_configurator.py --device="tcp:127.0.0.1:5760" --vehicle-dir="/path/to/params" --n=0 --loglevel=INFO -t=ArduCopter

This command will connect to the flight controller at tcp:127.0.0.1:5760, use the parameter files in the specified directory, start with the first parameter file, set the logging level to INFO, and target the ArduCopter vehicle type.

For more detailed information on the command line options, you can run the script with the -h or --help flag to display the help message:

python ardupilot_methodic_configurator.py --help

This will show a list of all available command line options along with a brief description of each.

Troubleshooting

If you encounter any issues during the configuration process, refer to the error messages provided by the application.
These messages can guide you to the specific problem and suggest possible solutions.
If the issue persists, consider consulting Amilcar Lucas at ArduPilot community forums or re-read this documentation.

10 Likes

Hi @amilcarlucas , seems a great tool , thanks!
How can we test it to give you feedback? :slight_smile:

wow, looks great.

its to compare between 2 params files?

to setup firts time flight controller?

No, it directly compares the parameters on the flight controller with parameters on file(s)

It is to semi-automate the Methodic tuning Blog post, it replaces mission planner and a text editor.

1 Like

Does it save new files, or just edit the existing ones?

Is there a way to try it?

It edit the existing ones

Start out by making a copy of all files into a new directory as explained in the blog post

Them use the gui , after that you can still compare the two directories if you want

1 Like

Amilcar are you referring to this post?

I can’t find the location to download the configurator GUI from. Could you provide a link?

In any case, the core question I’d like to ask (since I can’t find the source code) is which GUI Python framework you used?

Thanks!

It is under development and the code is not available yet. The backend is separated from the frontend.
The existing frontend is tkinter but it can easily be replaced with something else

If you want some feature implemented, now is the best time to ask.

Really happy to see this taking shape. I firmly believe the way forward should be web apps. With proper permissions from the user, the browser can do a lot with connected peripheral hardware, and you can offload nearly all tasks to the client browser to keep the server backend pretty light.

2 Likes

Yes @Yuri_Rage that is the plan. First a python application, then a client side web application with serial/USB permissions and local filesystem access. The application is currently a filesystem backend, a serial communication backend and a tkinter frontend. All currently in python, using SCM concepts, the application is configured using :

  • an apm.pdef.xml file
  • a 00_default.param file extracted from a .bin log file
  • a .JSON file with documentation URL links
  • the intermediate parameter files contained in the Blog post
4 Likes

Hi @amilcarlucas , very interesting , as soon as it is ready let me know , and I will be very interested to give you feedback on its operation

1 Like

The new software for configuration automation is available:

feedback is welcome

1 Like

@amilcarlucas
I was going to install the configurator you made but have ran into this error on windows 11
“C:\Users\XXX\Documents\MethodicConfigurator>pip install ardupilot_methodic_configurator
ERROR: Could not find a version that satisfies the requirement ardupilot_methodic_configurator (from versions: none)
ERROR: No matching distribution found for ardupilot_methodic_configurator”
I am not entirely sure how to proceed, do you have any clues?

Yes, that is expected.

Use git clone instead

I did use git clone to clone it (C:\Users\xxxx\Documents>git clone GitHub - ArduPilot/MethodicConfigurator: A clear ArduPilot configuration sequence)

Then just run it, you do not need the pip install

Please re-read the README.md carefully

Thank you for this Amilcarlucas will download later or first thing in morning my half a brain cell will be overloaded and blow the main fuse or maybe I should dilute said half a cell with some of the magic Scotch Whisky only jesting

did you possibly change the readme Some users can not read, so remove this. It should be re-added later · ArduPilot/MethodicConfigurator@e712aa8 · GitHub
as I was following what you posted yet got those results, looks like they are more clear now!

@amilcarlucas

following the new instructions I get the following error on windows 11:
C:\Users\xx\Documents\MethodicConfigurator>python3 ardupilot_methodic_configurator.py
Traceback (most recent call last):
File “C:\Users\xx\Documents\MethodicConfigurator\ardupilot_methodic_configurator.py”, line 24, in
from backend_flightcontroller import FlightController
File “C:\Users\xx\Documents\MethodicConfigurator\backend_flightcontroller.py”, line 82, in
class FlightController:
File “C:\Users\xx\Documents\MethodicConfigurator\backend_flightcontroller.py”, line 165, in FlightController
def create_connection_with_retry(self, progress_callback, retries: int = 3, timeout: int = 5) → mavutil.mavlink_connection:
NameError: name ‘mavutil’ is not defined

please install pymavlink:

python -m pip install  pymavlink argparse pyserial typing