New ArduPilot methodic configurator GUI

No I’m not pushing you to windows at all.

Linux is great.

And I 'm sure it will work fine in bookworm. We just need to find a way

Im on holidays and away from any PCs. I only have a smartphone. Once I’m back at the office I can help you out more.

After cloning did you try:

Bookworm tends to enforce venv installs for Python. If your implementation uses global pip modules, it will likely break under Bookworm.

It can and should be installed on a local user directory.

Understood. But if your installer calls pip install outside of a venv, you are calling for installation of a system-wide (user level) module, which will break under Bookworm. The prereqs script for AP’s dev environment is a good example of multi-distro compatibility, including Bookworm.

Then @nostromo123 needs to use my FOR_DEV_ONLY branch where nothing gets installed and all code runs from source in the cloned repository.

1 Like

IMHO, he should create and activate a venv, and proceed with installation from there.

I am not in a position to review the Linux install method in any detail right now, but I think that should work.

@nostromo123 keep us informed on what works.

@amilcarlucas

Your holiday goes first!

I installed a xubuntu 22.04 as a VM under Debian and try my luck with that OS. With that ‘quite short’ installation instruction.

But I have to admit, I am an old ‘dummy’ when it comes to python. Remembering how Yuri_Rage talked me through this here Debian 12 Build Environment? and you also seems to be interested in running things under Debian, there is hope! Think there are more then just me outside there with Linux on the desktop, who would like to have your ‘methodic configurator GUI’ on their systems …

br Karl

On a fresh Xubuntu 20.04 in a VM here it seems to look a bit better.

~$ pip install -U MethodicConfigurator

“Command ‘pip’ not found …”

! install python3-pip !

~$ pip install -U MethodicConfigurator

“WARNING: The script xxx is installed in ‘/home/user/.local/bin’ which is not on PATH.”

! add PATH !

      Looks good up to here, but how to start that thing?? Try a

~/.local/bin$ ./ardupilot_methodic_configurator

Traceback (most recent call last):
File “/home/user/.local/bin/./ardupilot_methodic_configurator”, line 5, in
from MethodicConfigurator.ardupilot_methodic_configurator import main
File “/home/user/.local/lib/python3.10/site-packages/MethodicConfigurator/ardupilot_methodic_configurator.py”, line 23, in
from MethodicConfigurator.frontend_tkinter_base import show_error_message
File “/home/user/.local/lib/python3.10/site-packages/MethodicConfigurator/frontend_tkinter_base.py”, line 13, in
import tkinter as tk
ModuleNotFoundError: No module named ‘tkinter’

! install python3-tk !

~/.local/bin$ ./ardupilot_methodic_configurator

Traceback (most recent call last):
File “/home/user/.local/bin/./ardupilot_methodic_configurator”, line 5, in
from MethodicConfigurator.ardupilot_methodic_configurator import main
File “/home/user/.local/lib/python3.10/site-packages/MethodicConfigurator/ardupilot_methodic_configurator.py”, line 23, in
from MethodicConfigurator.frontend_tkinter_base import show_error_message
File “/home/user/.local/lib/python3.10/site-packages/MethodicConfigurator/frontend_tkinter_base.py”, line 26, in
from PIL import ImageTk
ImportError: cannot import name ‘ImageTk’ from ‘PIL’ (/usr/lib/python3/dist-packages/PIL/init.py)

! install python3-pil.imagetk !

~/.local/bin$ ./ardupilot_methodic_configurator

2024-07-05 19:24:39,578 - WARNING - You should uninstall ModemManager as it conflicts with ArduPilot
2024-07-05 19:24:39,583 - INFO - Available connection ports are:
2024-07-05 19:24:39,583 - INFO - tcp:127.0.0.1:5760 - tcp:127.0.0.1:5760
2024-07-05 19:24:39,583 - INFO - udp:127.0.0.1:14550 - udp:127.0.0.1:14550
2024-07-05 19:24:39,585 - INFO - Will connect to /dev/ttyS0
2024-07-05 19:24:39,585 - WARNING - Connection failed: Could not configure port: (5, ‘Input/output error’)
2024-07-05 19:24:39,585 - ERROR - Failed to connect after 3 attempts.
2024-07-05 19:24:39,585 - ERROR - Could not configure port: (5, ‘Input/output error’)

and this window pops up …

Screenshot_2024-07-05_19-26-51

Hope the way I tried to highlight things a bit here, is appropriate.

br Karl

Thanks, that helps.

That is the correct window if there is no FC connected.

I suspected that the problem is on the Debian 12 side. Just loaded Xubuntu 24.04 and I am curious, if it is easy like that there too …

Here on a Xubuntu 24.04 VM

user@user:~$ pip install -U MethodicConfigurator
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

So Ubuntu goes in the same direction like Debian!

Maybe I can find a good article in the net how to convert to venv … :wink:

Would suggest to have a look at ‘appimage’ to bypass that ‘confusion’. Examples I am using are QGC and EgdeTX_Companion which both come as appimages.

Karl

All I think :thinking: I need to do is add the venv instructions to the linux instalation section on the README.md file.

Can you do a github PR for that?

What is that github PR? Do you mean a new pull request here?

No problem :wink:

But I could not keep my fingers still.

On Xubuntu 24.04 now

! install pipx !

~$ pipx install MethodicConfigurator

installed package methodicconfigurator 0.8.7, installed using Python 3.12.3
These apps are now globally available
- annotate_params
- annotate_params.py
- ardupilot_methodic_configurator
- extract_param_defaults
- extract_param_defaults.py
- param_pid_adjustment_update
- param_pid_adjustment_update.py
done! :sparkles: :star2: :sparkles:

! add export PATH="$PATH:$HOME/.local/bin" to .bashrc !

~/.local/bin$ ./ardupilot_methodic_configurator

Traceback (most recent call last):
File “/home/user/.local/bin/./ardupilot_methodic_configurator”, line 5, in
from MethodicConfigurator.ardupilot_methodic_configurator import main
File “/home/user/.local/share/pipx/venvs/methodicconfigurator/lib/python3.12/site-packages/MethodicConfigurator/ardupilot_methodic_configurator.py”, line 23, in
from MethodicConfigurator.frontend_tkinter_base import show_error_message
File “/home/user/.local/share/pipx/venvs/methodicconfigurator/lib/python3.12/site-packages/MethodicConfigurator/frontend_tkinter_base.py”, line 13, in
import tkinter as tk
ModuleNotFoundError: No module named ‘tkinter’

! install python3-tk !

~/.local/bin$ ./ardupilot_methodic_configurator

2024-07-06 11:01:05,992 - WARNING - You should uninstall ModemManager as it conflicts with ArduPilot
2024-07-06 11:01:05,998 - INFO - Available connection ports are:
2024-07-06 11:01:05,998 - INFO - /dev/ttyS0 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS1 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS2 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS3 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS4 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS5 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS6 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS7 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS8 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS9 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS10 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS11 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS12 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS13 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS14 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS15 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS16 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS17 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS18 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS19 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS20 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS21 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS22 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS23 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS24 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS25 - n/a
2024-07-06 11:01:05,998 - INFO - /dev/ttyS26 - n/a
2024-07-06 11:01:05,999 - INFO - /dev/ttyS27 - n/a
2024-07-06 11:01:05,999 - INFO - /dev/ttyS28 - n/a
2024-07-06 11:01:05,999 - INFO - /dev/ttyS29 - n/a
2024-07-06 11:01:05,999 - INFO - /dev/ttyS30 - n/a
2024-07-06 11:01:05,999 - INFO - /dev/ttyS31 - n/a
2024-07-06 11:01:05,999 - INFO - tcp:127.0.0.1:5760 - tcp:127.0.0.1:5760
2024-07-06 11:01:05,999 - INFO - udp:127.0.0.1:14550 - udp:127.0.0.1:14550
2024-07-06 11:01:06,000 - INFO - Will connect to /dev/ttyS0
2024-07-06 11:01:06,000 - WARNING - Connection failed: Could not configure port: (5, ‘Input/output error’)
2024-07-06 11:01:06,000 - ERROR - Failed to connect after 3 attempts.
2024-07-06 11:01:06,000 - ERROR - Could not configure port: (5, ‘Input/output error’)

and

Screenshot_2024-07-06_11-03-17

Things are clearing up here. Shall switch my attention now to Debian …

Enjoy your holiday!!

Karl

1 Like

Debian 12 also working now. Same installation procedure as with Xubuntu 24.04. Just use pipx instead of pip and look for missing necessary packages to be installed. Also PATH has to be set in .bashrc with export PATH=“$PATH:$HOME/.local/bin”

Nice can you do a pull request adding that info to the README.md file?

Sorry, but I don’t get how this pull request thing works on that github website …

Those are the commands

Ubuntu 22.04.4

~$ sudo apt install python3-pip python3-tk python3-pil.imagetk

~$ pip install -U MethodicConfigurator

and Ubuntu 24.04 (and Debian 12)

~$ sudo apt install pipx python3-tk

~$ pipx install MethodicConfigurator

br Karl

Pipx is a poor workaround. Use a proper venv as enforced by the distro.

@Yuri_Rage @nostromo123 I now updated the install instructions on the README.md file to use venv

Can you guys review my changes?

I added more used case documentation on how to use an existing configured vehicle parameter values instead of the template values:

v0.8.8

Commits