Matlab Physics for Drones

Project AirSim allows users to import their existing Simulink physics models as an alternative to the built-in Fast Physics. The AirSim server transmits information about the applied vehicular forces and the environmental state which the Simulink model processes to compute the vehicle’s kinematic state, all through TCP.

Prerequisites

Download and install Matlab + Simulink 2022a with the Aerospace Blockset add-on.

Install Matlab Engine API for Python

In order to connect to Matlab from the Python client, the Matlab Engine API for Python must be installed. More information can be found on the MathWorks documentation but the general installation steps are prescribed below:

  1. Run a command prompt as Administrator

  2. Activate a Python virtual environment and navigate to the directory where the Matlab API Python library is installed: cd "C:\Program Files\MATLAB\R2022a\extern\engines\python"

  3. Install the Matlab API Python library: python setup.py install