I don’t mean to sound too harsh, but if you’re having struggles as fundamental as those, one has to wonder what you hope to gain by having a development environment set up in the first place.
The provided instructions and scripts are pretty robust and should result in a clean environment on any reasonably configured Linux system, virtual machine, or container. However, a complete novice to Linux, git, and/or software development at large may well struggle, since there needs to be some fundamental understanding of what’s happening in the first place…
What is it that you need from a dev environment that Mission Planner’s SITL cannot do?
EDIT:
I just spun up a brand new Ubuntu 22.04 LTS container (which is what you’d get under WSL2) and followed the wiki instructions verbatim. In 5 minutes, I was connected to a SITL instance. Here’s a consolidated list of commands, only the last of which contains a flag that isn’t explicitly listed in the documentation (but can be found by listing flags, per the documentation with the -h switch). I used --no-mavproxy
because I was running this development environment on a networked server without its own display.
sudo apt update
sudo apt upgrade -y
sudo apt install git
git clone --recurse-submodules https://github.com/ArduPilot/ardupilot.git
cd ardupilot
Tools/environment_install/install-prereqs-ubuntu.sh -y
(logout, login)
cd ardupilot/ArduCopter/
sim_vehicle.py -w
(Ctrl-C to kill default instance)
sim_vehicle.py --no-mavproxy
The wiki doesn’t go down the rabbit hole of teaching you how to use git because (in part) it’s very reasonable to assume that if you want to use a development environment, you’re already familiar enough to, for example, check out a branch.
I’m not sure what would be gained by forcing a developer to maintain a ready-made image when the prereqs script creates this environment in a matter of minutes. Anyone who struggles to follow these instructions would likely struggle equally to use/install a disk image.