Distance sensor

This is a simple distance sensor that emulates an ultrasonic sensor to measure the distance to an object.

Configuration

The configuration for the distance sensor can be set up in the Sensors section of the configuration tab (accessible through the custom session panel). By default, the distance sensor points to the front of the vehicle. The following parameters are available:

Parameter

Description

MinDistance

Minimum distance the sensor can capture

MaxDistance

Maximum distance the sensor can capture

X, Y, Z

Position of the sensor relative to the vehicle

Roll, Pitch, Yaw

Orientation of the sensor relative to the vehicle

Accessing distance data

The distance sensor can be accessed through the getDistanceData method.

client = airgen.MultirotorClient()
distance = client.getDistanceData()