Engee documentation

Ardupilot

The block library is designed for cosimulation Engee with the Ardupilot autopilot in SITL (Software In The Loop) mode.

In the simulation mode, the responsibilities are divided into: model Engee calculates the physics of the device (dynamics, sensors), and Ardupilot calculates the control logic. In SITL mode, Ardupilot works in the mode of calculating the physical parameters of the simulation from an external source: it does not simulate the device itself, but sends it to Engee PWM signals to the motors and receives sensor data in response (angular velocities, accelerations, position, orientation, speed). Library Blocks Ardupilot This exchange is serviced, and autopilot telemetry can be received in parallel by library units. MAVLink.

For working with library blocks Ardupilot install/update the support package equipment.

How to use ad blocks

The exchange is built around a UDP bridge, which creates a block Ardupilot Setup:

  1. block Ardupilot Setup opens a UDP socket on the port 9002, listens to Ardupilot PWM frames and outputs a connection descriptor;

  2. the descriptor is fed to the input of conn blocks Ardupilot RX and Ardupilot TX — they work across this common bridge;

  3. block Ardupilot RX Accepts autopilot PWM signals (motor control);

  4. block Ardupilot TX sends sensor data calculated by the model to the autopilot.

The exchange is synchronized (lockstep): a new PWM frame from Ardupilot arrives only after the block Ardupilot TX I have sent another sensor frame, so the frequency of the model calculation steps should correspond to the frequency of the autopilot cycle.

To run the blocks, you need an Ardupilot SITL in the mode of calculating the physical parameters of the simulation. A ready-made Docker container with Ardupilot SITL and MAVProxy is included in the examples of the support package — see the article ArduPilot SITL: infrastructure for running cosimulation.


Ardupilot RX

Receiving PWM signals from the autopilot.

Ardupilot Setup

Configuring a UDP bridge with Ardupilot SITL.

Ardupilot TX

Sending sensor data to the autopilot.