If you always wanted to do simulation before the actual deployment of your drones, then we’re sailing in the same boat with others who’re involved in drone-related projects. This rule applies to robotic projects also because of the presence of multiple high-cost hardware equipment in the system.
Note
This article is about running the simulation present in the Mission Planner, which uses the same ArduPilot’s SITL models as those used in Linux. If you’re looking for setting up the ArduPilot’s SITL on your Linux machine, then you can have a look at the following article:
Image Credits: Technology illustrations by Storyset
When it comes to Ardupilot’s Software In the Loop (SITL) simulation, setting up the environment is a painful part, but it is so simple in Linux-based operating systems when compared to Windows. Also, this requires some basic knowledge of git and some basic understanding of Linux.
Advertisement
Instead of setting up an actual SITL on Windows, we can proceed with a simple workaround of enabling the simulation with a single click, using Mission Planner.1
Mission Planner is one of the mavlink supported Ground Control Station (GCS) software that runs natively on the Windows operating system. Also, we can able run Mission Planner on Linux and Mac OS using Mono.
Mission Planner SITL works only on the latest version. You can download the latest version of Mission Planner from the below link or by visiting the official downloads page:
Running SITL Simulation on Mission Planner
The Mission Planner’s Simulation uses the same SITL models as those used in the Linux environment sim_vehicle.py
script and utilizes the current master development branch of the code for firmware. You can follow the below steps to run the SITL simulation on Mission Planner.
Simulation
Click on the SIMULATION tab from the list of tabs present on the left side of the top bar.
Simulation - Mission Planner
The above action leads to the opening of Mission Planner’s Simulation tab that holds the information of vehicle types for simulation.
Simulation Tab - Mission Planner
You can able to simulate the following type of vehicles on your device using Mission Planner:
- Multirotor
- Rover
- Plane
- Helicopter
Click on the type of vehicle that you want to simulate on the Mission Planner, as shown below.
Select Vehicle Type - Mission Planner
The above action leads to the downloading of SITL software in the Mission Planner with the selected vehicle’s Ardupilot firmware.
Downloading SITL Software
The SITL simulation will automatically download using Mission Planner, but completion of this action requires an active internet connection. Once completing the download, Mission Planner automatically establishes the connection to SITL software.
Auto Connect - Mission Planner
Advertisement
In the connections tab on the right side of the top bar, you will see the automatic establishment of the TCP connection to the simulated vehicle, as shown below.
TCP Connection - Mission Planner
The SITL application will be running on your device along with Mission Planner. You can minimize that window. Since I’ve selected Multirotor simulation, Arducopter.exe
is running on my device.
SITL - Mission Planner
By following the above steps, you can able to run the SITL simulation on Mission Planner successfully.
Simulation - Testing
In this section, we’ll be checking the behavior of the simulated vehicle by following basic operations:
This section is actually for beginners who started using the Mission Planner’s simulation. You can skip this section if you’ve already used Mission Planner’s simulation.
Changing Flight Modes
You can change the flight modes of your simulated vehicle using the Actions tab present under the Heads-up Display (HUD).
Actions Tab - Mission Planner
There are more than 15 flight modes available on the Modes drop-down box located in the Actions tab. Select any one of the required modes and click on the Set Mode button located in the same Actions tab.
List of Model - Mission Planner
Advertisement
Now, you can able to view the changed mode in the HUD of your screen, as shown below. Since I’ve selected Guided mode, it’s displaying the mode as Guided in the HUD.
Guided Mode - Mission Planner
Arming and Disarming Motors
After changing the flight mode to Guided, you can able to Arm and Disarm the motors of the simulated vehicle. For arming motors of your vehicle, click on the Arm/Disarm button located on the Actions tab.
Arming Motors - Mission Planner
For disarming motors of your vehicle, click on the Arm/Disarm button again, which opens a dialog box to confirm your action, in that dialog pressing Yes will disarm the motors of your vehicle.
Disarm - Mission Planner
By following the above steps, you can able to arm and disarm the motors of the simulated Vehicle in Mission Planner.
Disarming Motors - Mission Planner
Conclusion
In this article, I’ve tried to explain how to set up the Software In the Loop (SITL) simulation in Mission Planner. I’m expectantly waiting for your valuable feedback and suggestions regarding this topic.
At last, Sharing is Caring, feel free to share with your friends if you’ve liked this article. Thank you!
References
Mission Planner Simulation, ArduPilot. ↩