Holey Triangular Calibration

@Gero I have not seen that before and don’t know what travisCI is.

I’m not sure what this means??

i might just have took a absurd and wrong turn. I am sorry.

Why mint and not a confirmed distro?
If PIP is installed a -> pip list <- in a terminal let us compare the installed modules.
What is the python and pyserial version?

@Tjacobs713

Never used it.

Have you tried googling some of these errors with: Linux, kivy and python included in the search?
@Tjacobs713 EDIT1: I googled the this and found some good info you might want to look at:
python - Kivy not working (Error: Unable to find any valuable Window provider.) - Stack Overflow

When I did this it was a long tome ago, and with wondows, and I … EDIT2: found a few parenthesis syntax issues in main.py … that was giving me errors. I might have just fixed it and moved on. With your python editor, open the files in this list that have import errors and compile them to see if it complains about anything.

It’s also possible that you need addition modules installed.

This error means tht the package isn’t installed.

different distros name the packages differently. I’m not familiar with mint so I
can’t say how the package would be named.

I’ll try to look things up later, but I don’t have time right now.

David Lang

1 Like

@Tjacobs713 Looking at your command prompt, It appear you are using the Anaconda python which is usually used to create a virtual environment. Also the Kivy version you are using is older 1.9.1, the most current version is 1.11.0 which was just released this month.

You could try updating Kivy in a virtual env like this:

Create a new virtual env.

conda create -n holeyGC

Activate your new virtual env.

conda activate holeyGC

Now you should be in the new environment, you can install the dependencies.

pip install pygame

conda install python=2.7 appdirs Cython Kivy packaging Pillow pyparsing pyserial requests six scipy -c conda-forge

cd into the GroundControl directory and run the main program.

python main.py 

When you are done close GroundControl and exit the environment

conda deactivate

Disclaimer - I have never used GC this way, but did a quick test and I was able to launch GroundControl. Is anyone else running GC in Anaconda or any other virtual env.?

Your other option to get Kivy running would be to use one of the Ubuntu PPAs as mentioned in the Kivy website. https://kivy.org/doc/stable/installation/installation-linux.html

1 Like

@Gero @WoodCutter4 @Jamtek @dlang Thanks everyone!! I will try the suggestions and get the exact version numbers requested as soon as I get home from work

Just a shot in the dark, but when I had problems with “no valid window provider” it turned out to be that Kivy was looking for OpenGL and couldn’t find it. I had to install MESA to simulate the OpenGL interface.

ok everyone I got this up and running finally, thanks again for every ones help! Linux is all new to me and I think my biggest problem was installing anaconda, I thought it was going to install Kivy, numpy and several packages I was going to need. I didn’t realize it was to run in a virtual environment and cause conflicts with everything and I could not even get it to uninstall, I ended up reinstalling Linux completely to get rid of it. Then the next big problem was getting the USB to work, every time I would try to load the firmware it had a error and said it wasn’t loading. Googled all kinds of stuff about that and finally got it to work. I think I might try to make a short write up on exactly what I did and where I got everything so if anyone else new with linux wants to try it maybe it will cause a little less pain. Thanks Travis

4 Likes

I’m a little surprised you had such problems with Anaconda, but it contains lots of features you don’t really need for the Maslow. You can put your write-up in the Wiki category; it would be a great addition to the documentation.

1 Like

@jwolter I’m sure Anaconda was not the problem, it was all me being new! I ran it just like @Jamtek said to above and it worked fine. I just didn’t like having to go into a virtual env to run it. The way I have it now I made a Icon on the desktop that will launch it just like windows did.

4 Likes

I know I have been a little absent lately, but you guys, @Tjacobs713, @Jamtek, et al, are crushing it. Good work!

Hi, @Joshua, One small thing I noticed when testing with virtual environments is that the scipy, numpy are missing from requirements_linux.txt and requirements_osx.txt. in your fork/branch of OneControl.

Do the requirement.txt files need a refresh for both the main branch of GroundControl and the HoleyCal version?

I noticed at least one package was flagged for a security issue.

HP-Notebook:~/GroundControlUpdate$ pipenv check
Checking PEP 508 requirements...
Passed!
Checking installed package safety...
36546: requests <=2.19.1 resolved (2.13.0 installed)!
The Requests package before 2.19.1 sends an HTTP Authorization header 
to an http URI upon receiving a same-hostname https-to-http redirect, 
which makes it easier for remote attackers to discover credentials by sniffing the network.

It occurs to me that it could be really helpful if there was a container that had a working holey calibration environment installed and operational that could just be deployed by new users in a virtual machine.

Obviously it would need to be constrained but something like run Ubuntu or Debian version X or whatever the maintainer required and then install docker. From there download and run the docker container and presto it should just work.

Taking it a step further it, why bit make it an entire VirtualBox virtual machine for the OS. So the host OS for the docket container is the VirtualBox instance and thay comes with the docker container pre-installed but the docker container can also be updated from within the virtual instance without requiring any changes to the virtual machine image. This allows the base virtual machine image to be relatively stable and unchanged to minimize work.

This way it could be a few clicks to operational.

  1. Install VirtualBox and USB extensions
  2. download the guest OS image for maslow containers and add usb pass through for arduino
  3. start the maslow virtual machine and run an auto update for the OS itself that would also check and update any maslow docker containers
  4. start the docker container for your desired Groundcontrol version of instance
  5. enjoy mainline or hole calibration or other maslow experience without having to mess with Linux packages

I don’t know docker but I can help with documenting how to set up VirtualBox where we need more docs to bridge to a maslow docker model. Otherwise VB is extremely well documented.

VirtualBox is free and excellent. And it would allow windows, Mac and Linux users to use a known Linux OS config regardless of their desktop OS of choice.

I don’t know how to set up docker but I have seen it used this way for projects with a lot of niggly dependencies like this. Moreover there could be both a main stable docker container and a holey calibration container and users could switch back and forth fairly easily. As well as making it easier for future forks and branches to be developed and tested by the broader community.

It’s a shame to have so much enthusiasm and energy sapped by trying to set up OS and package level variables and config. Given that the maslow hardware is a known constant (except where advanced users intentionally modified it) it seems this could be an elegant way to streamline this part of the ecosystem.

Thoughts?

-Jeff

2 Likes

@JWoody18 I like where your head is at. I’ve used VirtualBox for work and like it. What about licensing (forgive me, I’m a Windows guy) for everything mentioned, all open source software is used?

As far as I know, Yes, everything is open source and or free to use.

VirtualBox.org

“VirtualBox is a powerful x86 and AMD64/Intel64 virtualizationproduct for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 2. See “About VirtualBox” for an introduction.”

Docker

And to get it for Debian
https://hub.docker.com/editions/community/docker-ce-server-debian

"Get Docker Engine - Debian (Community)

Available for free to install on any server, VM, or cloud with community support."

Details on deploying it for a project here

As for all the maslow pieces I think that is well established and readily available.

Hope that helps. I strongly recommend Debian or Ubuntu as the base as Debian branch OSes are extremely widely used by end users and well supported and documented.

I think this would really save a lot time and improve accessibility for all.

Jeff

1 Like

@JWoody18, What you described in your post using Docker has already been achieved at least on the RapberryPI with the WebControl option for the Maslow.

The original GroundControl utilizes the Kivy Python framework for Graphics and needs a fairly capable GPU to render graphics, which is one thing that Docker is not good at. Also, if you don’t have the GPU hardware the VM will not help.

Where Docker shines is with web based applications, and as the name WebControl suggests runs in a web browser as a with a RESTful API. I know there was discussion of integrating Holey Triangular calibration into WebControl, but I’ve lost track and not sure that its happened.

Also, I apologize if my posts about python virtual environments were misleading, there is no reason you would need to use one.

1 Like

at the moment, holey triangular calibration and webcontrol are not compatible,
we need to either change the firmware version that holey triangular reports, or
merge it into the mainline so that webcontrol can tell the difference between it
and the stock firmware.

David Lang

1 Like

I haven’t used VirtualBox in about a year but I understand the graphics support has come along nicely. I believe if your host has good opengl support that it can provide decent performance.

Perhaps the docker container aren’t needed and it would be easier to just produce Getting Started VM images for mainline and holey calibration. You can still easily switch by just booting the appropriate one. All that is required is loading the correct firmware to the arduino before continuing. Correct?

Jeff

For anyone interested… getting this to run on LinuxMint is real simple once you figure out how to do it. I’ve spent 30-40 hours the last two weeks trying to make this work on windows and gave up. It still took me hours of reading/watching videos/ and asking questions in forums. I’m reloading LinuxMint on my lap top and making step by step directions as I get time to help people get this calibration process to work.

Now for my question… I’m running the calibration and When it gets to sled weight it ask for it in Newton’s… I thought I read up in this thread that it wanted it in pounds… what one do I need to input? Thanks. Travis

2 Likes

Enter the weight in Newton’s.

This was a somewhat recent development.