Physics based copter simulator

I have started development of a new sim frontend for the SITL backend. It is simulating the copter as a rigid body in the bullet physics engine. I have finally gotten a stable simulation with all sensors being sent correctly to the copter - including positioning data and compass. Tested autotune, poshold, alt_hold and stabilize modes - work great.

This code can serve as an example for how to build a custom simulator for the sitl backend. Also, since it uses irrlicht engine for rendering, you can easily load a large number of mesh formats and even quake 3 maps to fly in (see screenshots). Also, since it is using a physics engine, it is possible to have environments that are physically interactive.

Do not expect much from the code right now. It is a development experiment and not intended for novice users right now. It is a research project right now but you are free to clone it and improve on it.

Screenshots:

https://github.com/mkschreder/quadsim/blob/master/screenshots/02-aug-2016-1.jpg?raw=true
https://github.com/mkschreder/quadsim/blob/master/screenshots/01-aug-2016-2.jpg?raw=true

SITL module: https://github.com/mkschreder/ardupilot/blob/master/libraries/SITL/SIM_QuadSim.cpp
SITL cmdline: …/Tools/autotest/sim_vehicle.sh -S 1 -f physim --console --map

Source code: https://github.com/mkschreder/quadsim.git

1 Like