Drones have become very familiar in the last few years, but full-scale drones are expensive and difficult to purchase. So, here's how to run the drone in a simulator and check it on Linux. This article presents the shortest route.
MissionPlanner is a Windows version, but it can also be run on Linux Mono. The operation is a little unstable, but since it is reasonable to check the operation, I dare to use it on Linux this time. For full-scale operation of Mission Planner, we recommend the Windows version.
$ sudo apt-get update
$ sudo apt-get install git
$ sudo apt-get install gitk git-gui
$ cd ~
$ git clone https://github.com/ArduPilot/ardupilot
$ cd ardupilot
$ git submodule update --init --recursive
$ Tools/environment_install/install-prereqs-ubuntu.sh -y
$ . ~/.profile
~/.Add path to bashrc
$ vi ~/.bashrc
export PATH=$PATH:$HOME/ardupilot/Tools/autotest
export PATH=/usr/lib/ccache:$PATH
$ cd ~
$ cd ardupilot/ArduCopter
$ sim_vehicle.py -w --console --map
$ cd ~
$ sudo apt-get install mono-complete
$ wget http://firmware.ardupilot.org/Tools/MissionPlanner/MissionPlanner-latest.zip
$ unzip MissionPlanner-latest.zip -d MissionPlanner
$ ~
$ cd MissionPlanner
$ mono MissionPlanner.exe
A message box will be displayed at startup, but proceed.
Press the OK button.
Press the NO button.
Tips
For Japanese fonts, the font of the upper icon of Mission Planner may not be visible.
In that case, the spanner mark (Configuration)Press and change the UI Language to English(United States)Please change to.
The simulator (SITL) can be accessed from GCS on the following ports.
Select [Connection Method] TCP at the top right of the GCS (Mission Planner) screen and press the CONNECT icon.
Select [Connection Method] UDP at the top right of the GCS (Mission Planner) screen and press the CONNECT icon.
The connection is complete when the icon on the upper right turns green.
Press the Actions tab. Confirm that Guided is displayed in the red square part. (For other than Guided, select Guided from the select box on the left side of the SetMode button and press the SetMode button.) After pressing the Arm / Disarm button in the red circle, "ARMED" is displayed in the blue circle. "ARMED" will return to "DISARM" after a while.
In the "ARMED" state, do the following:
Right-click on the map and execute Take Off.
It is OK if the altimeter is 4 to 5 m.
Right-click on the map where you want to move and press Fly To Here.
Specify the altitude.
The move will start.
After selecting Land in the red circle select box, press the blue circle SetMode button. Confirm that the red square part is the Land display. The altitude gradually decreases.
Confirm that the altitude becomes 0m and the display is DISARMED.
The above is the minimum flight confirmation of the drone.
If you want to do it again, start from 1. Start (ARM).
Recommended Posts