Рет қаралды 124
After installing raspberryPi OS
--------------------------------------------------------,
Inserted the SD card to raspberrypi
Connected the device to power
Checked the IP address using ‘Advanced IP scanner’
Logged onto the ssh using the IP and username/password (you can use putty for this)
After logging on the device (Using SH)
Enabled the VNC server
sudo raspi-config
Select external interfaces and enable the VNC server connection.
It will enable and load the vnc server.
Now, you can use VNC viewer software to log into the raspberryPi using GUI.
Use the already known IP, 5900 as port, already known username/password pair.
After logging on the device (Using VNC viewer)
Update the system
sudo apt-get update
sudo apt-get upgrade
Install dependancies required to install ardupilot
sudo apt-get install -y git make g++ python3 python3-dev python3-pip python3-setuptools
sudo apt-get install -y libncurses5-dev libncursesw5-dev
sudo apt-get install -y gcc-arm-none-eabi
sudo apt-get install -y python3-matplotlib python3-lxml
Clone and build ardupilot
git clone github.com/Ard...
cd ardupilot
git submodule update --init --recursive
Creating virtual environment
python3 -m venv droneswarm
Activate virtual environment
source droneswarm/bin/activate
Install empty, pymavlink, and MAVproxy
pip install empy==3.3.4
pip install pexpect
pip install pymavlink
pip install MAVProxy
Install Waf build system
Do this from ardupilot folder
./waf configure
./waf copter
Add Tools folder to the path
sudo nano ~/.bashrc
go to the end of file, add this line
export PATH=$PATH:~/ardupilot/Tools/autotest
save the file.
Run
source ~/.bashrc
Run SITL simulator
Here we are planning to assign the vehicle ID 100 (you can give any ID between 1-255) for the simulated drone
sim_vehicle.py -v ArduCopter --no-mavproxy --sysid 100
This will start the simulator.
Now, we need to open-up another terminal and log on to the same virtual environment to run MAVProxy
mavproxy.py --master=tcp:127.0.0.1:5760 --sitl=127.0.0.1:5501 --out udp:192.168.0.5:14550
Here, 192.168.0.5 is the Ground station IP
This will connect the SITL flight simulator to the ground station via port 14550
#dronesimulator #ardupilot #drone #mavlink #mavproxy