How to methodically configure and tune any ArduCopter

Yes, it is possible. No, it will not mess the tuning. It will improve it.

1 Like

Ok…I used the install to get the methodic configurator installed. I ran the first script for setting the temp cal, put the quad in the freezer, took it out and plug in a battery. After some time the calibrate finished. I copied the log file off of the SD card, installed Python on my Win11 laptop, and copied the tempcal.py locally. When I try running it to get the graphs, I get the following:

C:\Users\kevin\Documents\tempCal>tempcal_IMU.py 00000086.bin
C:\Users\kevin\Documents\tempCal\tempcal_IMU.py:301: SyntaxWarning: invalid escape sequence ‘\d’
m = re.match(“^INS_TCAL(\d)ENABLE$“, msg.Name)
C:\Users\kevin\Documents\tempCal\tempcal_IMU.py:315: SyntaxWarning: invalid escape sequence ‘\d’
m = re.match(”^INS_TCAL(\d)
(ACC|GYR)([1-3])_([XYZ])$”, msg.Name)
C:\Users\kevin\Documents\tempCal\tempcal_IMU.py:327: SyntaxWarning: invalid escape sequence ‘\d’
m = re.match(“^INS_TCAL(\d)_TMIN$”, msg.Name)
C:\Users\kevin\Documents\tempCal\tempcal_IMU.py:333: SyntaxWarning: invalid escape sequence ‘\d’
m = re.match(“^INS_TCAL(\d)_TMAX”, msg.Name)
C:\Users\kevin\Documents\tempCal\tempcal_IMU.py:339: SyntaxWarning: invalid escape sequence ‘\d’
m = re.match(“^INS_GYR(\d)CALTEMP", msg.Name)
C:\Users\kevin\Documents\tempCal\tempcal_IMU.py:345: SyntaxWarning: invalid escape sequence ‘\d’
m = re.match("^INS_ACC(\d)CALTEMP", msg.Name)
C:\Users\kevin\Documents\tempCal\tempcal_IMU.py:351: SyntaxWarning: invalid escape sequence ‘\d’
m = re.match("^INS
(ACC|GYR)(\d?)OFFS
([XYZ])$”, msg.Name)
Traceback (most recent call last):
File “C:\Users\kevin\Documents\tempCal\tempcal_IMU.py”, line 20, in
from pymavlink import mavutil
ModuleNotFoundError: No module named ‘pymavlink’

What do I need to get this working? I also installed the MavProxy tool, but that didn’t help. Looks like I’m missing a file, but what do I get that from?

Thanks for any ideas you can provide,
Kevin

That script is not python 3.11 friendly. I stared integrating the script in the ArduPilot Methodic Configurator software. Once that is done you no longer need to install python or download the script. You will be able to use the ArduPilot Methodic Configurator software to compute the parameters and write the results to both file and flight controller. Stay tuned. I have big plans.

That sounds great. Thanks for the quick reply. In the meantime, would downgrading the Python I installed to say v3.10 allow me to continue with the tuning process? Or it’s better to wait for your next release?
Thanks again.

I already have a new version of tempcal_IMU.py inside my software. You can download and test that one first.

The new version helped. Now I’m just getting the following error:

C:\Users\kevin\Documents\tempCal>tempcal_IMU.py 00000086.bin
Traceback (most recent call last):
File “C:\Users\kevin\Documents\tempCal\tempcal_IMU.py”, line 11, in
from pymavlink import mavutil
ModuleNotFoundError: No module named ‘pymavlink’

Just to clarify, I only downloaded the new tempcal_IMU.py file. I noticed other files in the repository were new now as well. Perhaps I need to reinstall the whole MethodicConfigurator package?

No, you just need to do:

python -m pip install pymavlink numpy matplotlib

Edited with the tip from @KevinB below

Thank you! After I did the above, I got a new error about “numpy” missing, so I used the same syntax as pymavlink and got that one installed. Then the error changed to “matplotlib” missing. Did the same thing for that one…and then it worked and I finally got the graphs!
Thanks again for all the help.

1 Like

Thanks for the heads up. Other users can use that workaround if they need it. :+1:

Please post any future messages regarding the software in the Blog post of the software itself.
This other Blog post here is for questions about the method and it’s results.

Will do. Thanks again.

Finally tuned step by step a 43in prop size quad

Min Take off weight -35kgs
MTOW-50kgs

Did all tune etc on min take off weight.

The only step skipped was motor cal since this is a huge drone we didn’t want to risk putting the propeller upside down and do the test.

Following this guide helped a lot thank you @amilcarlucas .

Share folder payload drone logs - Google Drive

where 4 logs are shared
If someone can have a look at the log named- final flight with input shaping and atc-the-max0.9

And advise if the drone is flying good. Visually and as per logs it’s not bad at all.

Also just a request if PiD webtool can be enhanced or a details explanation regarding PiDs tuning that would help enthusiasts more.

2 Likes

Post a zip file with the intermediate parameter files.

The ArduPilot methodic configurator automatically generates one at the end of the configuration process. See chapter 8 of the user manual.

I couldn’t instal it. So I used the above mentioned step by step guide with web tools.

Tomorrow we will be tuning the second drone same specs with the configurator.

Meanwhile if you could check the final flight log with input shaping and at thr max0.9 and see if the tune and other calibrations ( specially magfit) is performing well.

Also do you need the pram file to check the tune ? I can share the full pram file but it’s not in the

Format

Also what I noticed while operating the drone

In loiter mode when ever we leave stick to neutral and drones starts to decelerate it always loses some altitude independent of the speed of the drone at which stick was got to neutral .

And when we are going in forward direction in loiter mode and turn or give a bank angle the drone wobbles a bit

Yes do send the param file, I will generate the intermediate param files from it.

Those are baro issues. Read section 1

1 Like

It’s uploaded in the same folder. FINAL PRAM

Hello. Tuning in Betaflight, you had a log view of the setpoint, gyro, P, I and D and FF to be able to see how the quad is tracking inputs. I’m most interested in acro mode. My quad is flying well in automated modes but the acro performance isn’t quite there yet. What values should I be using in the Ardu Log Viewer to get a similar view? I’ve found values that seem to be what I want but they don’t line up at all on the plot…so you can’t easily determine whether the quad is tracking RC inputs well, overshooting, etc. Thanks for any suggestions.

In your 05_remotecontroller file:
RC_OPTIONS,288 # Enables Crossfire Telemetry
SERIAL2_BAUD,115 # For Mavlink over crossfire

In your 06_telemetry file:

SERIAL1_BAUD,57 # The mavlink over CRSF telemetry

Where (or who) are those serialports 1 and/or 2 connected?

I use telemetry to my radiomaster, no connection with MissionPlanner. (with serial7_option =0 and brd_alt =1)

Are your params (like RC_options = 288) used when Radiomaster is connected with Usb to MissionPlanner on PC ?

thx for clarifications , i would like to understand your setup because it differs very little from mine.

Look in the RATE outputs and the PID messages. Note that both of these require you to select non defaults in LOG_BITMASK