Hello from Texas!

Wan't to discuss something that's relevant but has no forum, this is the place
bjorn
Bitcraze
Posts: 12
Joined: Mon Nov 02, 2015 10:16 am

Re: Hello from Texas!

Post by bjorn »

@hittstick and how did you find the "getting started" tutorials?

//Björn
hittstick
Beginner
Posts: 27
Joined: Thu Apr 06, 2017 7:26 am

Re: Hello from Texas!

Post by hittstick »

bjorn wrote:@hittstick and how did you find the "getting started" tutorials?

//Björn
@bjorn I really wish there were official instructions for setting up the development environment and PC client outside of running a VM. I had to use the instructions for installing on the raspberry pi 3 from the forum in order to get the software on my laptop which doesn't have enough memory to run a VM. Including an overview of the file structure would also be nice for beginners who don't have much experience with development. The "Getting Started with Development" section is completely geared toward the VM, but a lot of files are in different places and it makes the tutorial hard to follow.
H0stname
Member
Posts: 43
Joined: Fri Feb 17, 2017 5:44 am

Re: Hello from Texas!

Post by H0stname »

That was the biggest issue for me, the files are in different places, and in those places are slightly different instructions.

The wiki looks like the place with the most information in one spot, but some things do not seem to be on there (or are buried) and I had to find them seemingly by luck on Google. I usually just google something to try and find a solution, sometimes it leads me to the wiki, sometimes the forums for something more obscure, and other times some other bitcraze webpage I'm not sure how I'd find without google. Also sometimes the Github readmes. These are substantial and sometimes act as a wiki, but the information is slightly different at times so I get confused.

I wish I could go back and look at the exact pages I visited, to guide you guys through this but I was seemingly always in a hurry, and would get what I need then close a tab once the solution is solved because I would have a window and tabs for each topic (crazyflie/drone project, physics, random hobby or something) and the tabs would sometimes get out of hand. Going back and looking at the wiki, it looks good, and having everything up and running now (and understanding how it works), I don't see any issues, so I get why you guys don't either LOL. But I remember my struggles.

I think maybe consolidating the github readmes and the wiki would be a good place to look at first. It is very nice that you guys have documented so well on Github, but then trying to use the wiki as a reference seems to have older information. I apologize this response is vague, and not really helping you solve the issues we've complained about.
H0stname
Member
Posts: 43
Joined: Fri Feb 17, 2017 5:44 am

Re: Hello from Texas!

Post by H0stname »

For example, somewhere the documentation says python 3.4 is required because py2exe or something is not yet supported in python 3.5, but the latest version of QT (5.6) does not work on python 3.4 and caused strange errors when running cfclient. On a different webpage, I think a version is not specified, so I eventually installed latest versions of everything in a virtual environment which ended up working and not breaking my other stuff because it was contained. No conflicts with an old version of Spyder I use for data science/academic stuff to replace Matlab. This is not your guys fault.

In the end, this project taught me the importance of good dependency management especially with finicky python-wrapped C libs like QT, which segfaulted when other dependencies were changed and cfclient was launched (or Spyder). This led me to realize the problem must be QT incompatibility (using the version that works with python 3.4) so I made dedicated virtual environments for everything until I figured it out. This was a good approach that will help me in many other situations I'm sure, so I don't regret spending this time to learn how that works.

This also brings me to another thing I ran across. The wiki or some part of the github readmes says to use virtualenv for virtual environments, but I ended up using conda virtual environments. This is easier and handles difficult installs that the wiki says to install with apt instead of pip (as well as everything pip can do), and in the end I made a very nice configuration file that allows me to setup the cfclient in one line! It pulls the right dependencies, a certain commit of cfclient off github, and creates the environment, and I know it will work every time without needing the VM. Eventually I found a page on your guy's Github that uses conda virtual envs for the above reasons. Lol. But the official setup instructions still state to use virtualenv. I wish I had known you guys had started the move to conda venv at the beginning instead of screwing around with virtualenv. But if I had to start over from scratch to setup dev on my native linux machine, my super simple instructions would include:
- download miniconda
- download my preconfigured environment yml which pulls known working dependencies and some commit of the cfclient
create environment from file
- set udev permissions (this could maybe be scripted?)

Maybe release these conda environment .yml periodically instead of updating the VM. While lacking multi-OS support, that would at least get new users up and running on native linux quicker than it took me to debug issues with virtualbox USB drivers and decided to hell with Windows and the VM. No offense, that is theoretically a nice way to have rapid deployability, and the solution I have proposed will always install old dependencies in a world where you guys are constantly fixing bugs and committing changes. Maybe it's not the best solution, but I think it would work better than advising the VM which requires virtualization software with more variables out of your guys control. Maybe keep both and see what people like?

I realize this stuff changes, I learned a lot, I'm not regretting this. It was just a bit painful to get running. I have to say, I am very pleased you guys keep the software running very well and have an active dev community, this is more important than documentation IMO, so great job!!. But when you hit even a little issue, then you resort to documentation, which, if not consistent, results in more headaches, and more knowledge learned in the end if the challenges are overcome.

Also, I never got the toolbelt working reliably, but I did not seem to need it for modifying the cfclient.

I'll make a new thread in a more appropriate section, and I know I said I'd post a report you guys can copy verbatim, but after thinking about this, I think it is better to summarize my challenges, and post some concise, key points to fix up and that should be sufficient.
H0stname
Member
Posts: 43
Joined: Fri Feb 17, 2017 5:44 am

Re: Hello from Texas!

Post by H0stname »

Posted this

viewtopic.php?f=11&p=12297#p12297

It is the result of sifting through stuff and optimizing the setup to a conda virtual environment config file. Targeted at new users to linux, development and crazyflie. So starts with baby steps, but if were extended, would leave out extreme details like 'cd to some folder' etc.
H0stname
Member
Posts: 43
Joined: Fri Feb 17, 2017 5:44 am

Re: Hello from Texas!

Post by H0stname »

Edit: This has been greatly improved! I take back pretty much everything I have said. I left the project for a while and came back and found setup to be a breeze for getting started on a normal Linux machine. Dev doesn't seem too difficult either, but I may have still had some things configured from before. Thanks Bitcraze!
avajones77
Beginner
Posts: 2
Joined: Wed Dec 25, 2019 5:28 pm

Re: Hello from Texas!

Post by avajones77 »

Hi there.
Post Reply