Failed for submodule update --init --recursive

Other than what I suggested in your other message about quote marks, the steps look correct as per the course.

Since most users are migrating over to python 3, you might want to try this. There have been other forum talk on this topic [https://community.dojofordrones.com/t/wsl2-instead-of-virtualbox/711]. You can just use the latest version of Ubuntu and Copter as well.

It is best to go through each step so you understand it, but here I provide an easy means to setup the system. .

Notes

  • I am substituting ‘drone’ for ‘courseRoot’.
  • I have included .bashrc parameters to conveniently cd into ‘drone’ and ‘ArduCopter’.
  • I have included mkdir /drone/dk
  • It does not include installation of QGC.
  • It doesn’t include some dependencies and programs needed for Precision Landing simulation, for which I have not tested it

Hopefully it all works for you.

cd
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
sudo apt install build-essential manpages-dev git -y
sudo apt install python3-dev python3-pip -y
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
sudo apt install python3-opencv python3-wxgtk4.0 -y
sudo apt install python3-matplotlib python3-lxml -y
sudo apt install python3-serial python3-scipy python3-pexpect python3-tk -y
sudo apt install python3-future
sudo apt install screen -y
python3 -m pip install -U pygame --user
pip3 install PyYAML mavproxy
pip3 install mavproxy pymavlink --user --upgrade
python -m pip install empy
sudo echo “export PATH=$PATH:$HOME/.local/bin” >> ~/.bashrc
sudo echo “~/drone/apm/ardupilot/Tools/autotest”:$PATH >> ~/.bashrc
sudo echo “export drone=/home/$USER/drone” >> ~/.bashrc
sudo echo “export ArduCopter=/home/$USER/drone/apm/ardupilot/ArduCopter” >> ~/.bashrc
source .bashrc
sudo usermod -a -G dialout $USER
sudo apt remove modemmanager -y
mkdir drone
cd drone
mkdir dk
mkdir apm
cd apm
git clone -b Copter-4.3.7 GitHub - ArduPilot/ardupilot: ArduPlane, ArduCopter, ArduRover, ArduSub source
cd ardupilot
git submodule update --init --recursive
cd
sudo -H pip3 install dronekit==2.9.2
sudo -H pip3 install dronekit-sitl==3.3.0
cd ~/drone/apm/ardupilot
./waf configure
./waf copter
cd