SITL build


#1

Due to some changes with dependencies, some of you might have had some issues installing the ArduCopter SITL. Also a previous post of mine (https://community.dojofordrones.com/t/failed-for-submodule-update-init-recursive/947/3) had a few errors. The following code was tested on Ubuntu 22.04 and 24.04. I am using “Drone” in-lieu of “courseroot”. Any feedback on mods is welcome.

cd
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
pip3 install --upgrade pip
pip3 install setuptools
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==3.3.4 --user
mkdir drone
sudo usermod -a -G dialout $USER
sudo apt remove modemmanager -y
cd drone
mkdir dk
mkdir apm
cd apm
git config --global http.version HTTP/1.1
git config --global http.postBuffer 524288000
git clone -b Copter-4.5.7 https://github.com/ardupilot/ardupilot
cd ardupilot
git submodule update --init --recursive
cd
sudo echo “export PATH=$PATH:$HOME/.local/bin” >> ~/.bashrc
sudo echo “export PATH=$PATH:/home/$USER/drone/apm/ardupilot/Tools/autotest” >> ~/.bashrc
sudo echo “export drone=/home/$USER/drone” >> ~/.bashrc
sudo echo “export ArduCopter=/home/$USER/drone/apm/ardupilot/ArduCopter” >> ~/.bashrc
source ~/.bashrc
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


closed #2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.