I have tried to setup the build environment for ardupilot and not being a software person i have failed to get it working and from searching through the forums its common for users to have issues getting a working environment set up especially when dealing with different operating systems like windows and mac.
What would be really useful is a working ubuntu virtual machine in a virtual box container with ardupilot environment installed and ready to go so it can be used on any operating system drastically streamlining the process of being able to just edit and test a few lines in the code to just installing the container and logging into git.
I am going to have a go at making it tomorrow but it would be better if someone who knows what they are doing to do it properly, I know my way around virtual machines but that’s the easy part.
Thanks, that sounds very good.
We already support vagrant and docker. And the install script is regulary tested. In most case the issue comes from user issue looking at some old instructions or ignoring Errors on screen.
I don’t think a full VM will help much as you will need to keep it updated and manage the instruction to set it up too… And that isn’t that simple.
I have raise an issue years ago about making much better warning and error report on the installation script to help newcomers. It is a bit of work, but I expect it to be a nicer solution than bringing another build system.
docker is not ideal, it was designed for deploying server applications not for end user or development enviroments.
from what i can see Vagrant is just a streamlined way of setting up a STIL in virtualbox? i dont see what is the problem with having that prebuilt as a virtual box appliance rather than having to run a dozen commands to build it.
time where docker is restraint to server is ended, it is used a developpement environment in numerous case. Most of modern IDE allow to use docker as builder for binary, like VSCode for example.
But it really depends on what you want to do.
I am kind of reluctant to propose VirtualBox build as it need a Virtualbox setup (host additionnal, machine configuration, etc.) and we get back to first step where the build instructions are incomplete, and it will need some maintenance on time as we got some change on build and env tools.
If you want to share a premade machine, you free to do so, but I don’t think that somebody in the team want to have another system to maintain.
but it seems there is interest @khancyr. I know the docs are open source and “anyone” can edit them but for those of us that actually go to docs first before ask question they are irrelevant and wrong and we cannot help to edit them and you are stuck in this endless cycle of not getting enviroment setup and often times forum is of no use as folks ask did you read docs first?
seems like someone with the know how should update the docs so these kinds of questions don’t keep getting asked.
I`m with @Khancyr , It would be cool if you can do it, but the team should concentrate on the already existing scripts.
WSL is already a virtual environment of sorts. Is it possible to craft a custom image for WSL? That might be helpful enough for those who most often have trouble.
A WSL2 Ubuntu 20.04 LTS should work great. And we do have an install script for Ubuntu 20.04 so it should be an easy task. @pedro.martinez Want to help?
We all seemed to have glossed over the question of, “What were your issues with the install script?” & “Is there something we can do to make that experience better?”
Installing WSL2 should be relatively straight forward … and then point to using the install script.
We do need to update the instructions a bit for Win11.
Edit… I’m not sure how how nicely crafting an export of a WSL2 instance is going to go and it will be large…
Probably, better for us to figure out a Windows batch script to do all of the work.
The most common problem is Windows users getting confused by the multiple links in the documentation and either missing a crucial step or choosing a less than ideal method (like CygWin).
Tidy up the documentation for Windows users regardless of whether a VM image becomes available.
More recently, there have been a few cases where the user wanted to use an old/outdated branch. I’m not sure if there’s enough return on investment value in addressing the nuances of building old firmware.
Definitely on Cygwin.
I’ve over time tried to kill off the points where people start with Cygwin in the Docs but I’m sure there are spots in places.
Unfortunately, it is still a necessary evil to have it around.
Maybe explain that cygwin is only for developers, experts and programmers, that should scare the casual user away.
I will run through the docs again and make notes of where things hang up for me who is a novice in my eyes. If I remember right it seemed very hard to follow along to what was windows install steps and what wasn’t, linked content was often very confusing as it left it at here is the content figure out how to install it. this was a cpl of years back and I do believe docs have come leaps and bounds in last 1-1.5 years and of course I did use cygwin as last time I was trying to build I believe it was listed as the top choice in chronological order not “top” as in best or easiest.
Unfortunately, they are already at the dev page
And there are many warnings
Maybe @hwurzburg knows if there is a way to put a big red text at the top of Cygwin pages, “If you aren’t building SITL for mission planner or need more FPS for Real Flight* do not use Cygwin!!!”
(I’m not 100% sure the Real Flight bit is true anymore?)
I would not be difficult to put a banner on CYGWIN pages…the question the dev team must decide is if its desired…aside from a MP SITL executable, using WSL2 in Windows10 or 11 seems to be the best approach…I recently reverted my Linux laptop to Windows with the availability of WIN11…I can run a Lnux VM (WSL2) with no limitations on the road…at home I use Linux to build code and run SITL…for Realflight my Linux desktop runs SITL and my Windows desktop runs RealFlight and physics…
The barrier for being able to modify anything on ardupilot has slowly went up over the years, I remember using ardupilot long ago when it was actually possible to build it in Arduino, editing and compiling was simple, but as the years went on the barriers to get from editing a single line of code to having a working binary has slowly crept up and up.
look how many steps you need to do now to set up a system that can turn source code to a binary compared to back in the Arduino days, its not even comparable, you pretty much need to be a professional software developer now.
Being able to have a working environment out of the box would cut hours off getting started. It doesn’t have to be updated constantly, just major version changes, smaller updates can be done by the user.
you might find more people can contribute when they don’t have to spend hours figuring out how to get started.
@geofrancis we now support over 80 different boards and multiple vehicles. No wonder the complexity had to increase when compared with the arduino days. If you want, or need the old software and or processors … they are still there, git does not forget!. We just need to understand that the complexity always increases when things evolve, there is no work around that…
Except … we now have lua scripting. And that allows the users to change the code without compiling or requiring a fancy IDE.
So basically on my eyes ArduPilot has done what you want: increased the flexibility and functionality, while reducing the customability barrier for non-programmer users.
I have exactly the opposite experience.
Building code for the 8bit APM on a patched version of the Arduino IDE went more and more cumbersome with the needed special libraries etc.
Later for the nuttix boards I was never able to build my own code.
In the latest edition the documentation how to setup a build environment (in my case on a native Linux) and the belonging install scripts worked out better than ever before. Kudos to the guys who did this job!!!
I dont want to use old code, thats not the point. the point is the long number of steps required to change a single line of code and have it running on a vehicle.
In my case, all I want to do is edit a value in a driver, I could do that in notepad, but to go from there to something running on a flight controller is a very long complicated process.
Lua has been a huge step in the right direction for lowering the bar to implement features, but it still doesn’t cover the uses I’m describing.