Polarith AI
1.8
Aircraft Controller

This controller inherits from RpyController and serves as an example of how to use the 3D sensor together with the Context component, to transform the made decisions into meaningful steering values. In this case, the agent is only able to move forward. If there is the need to change the direction, this can only happen gradually by rotating using roll, pitch, and yaw. For slight turns, the controller will turn the agent by using yaw. For large and sharp turns the agent will roll 90° on its side and use pitch to perform the actual turn.

To move the agent, combine this controller with a physics component, e.g., Aircraft Physics (see below) or one that you created on your own. The controller itself will not apply any force to the agent but yields steering values.

Properties

This component has got the following specific properties.

Property Description
Context Reference to the Context component to provide decision information that will be transformed into roll, pitch and yaw.
Body Reference to the rigidbody that is used by the physics component to move the agent.
UsePidController Enables the PID controller which is used after roll, pitch, and yaw are calculated.
Roll Proportional (P), integral (I), and derivative (D) part of the PID controller for roll.
Pitch Proportional (P), integral (I), and derivative (D) part of the PID controller for pitch.
Yaw Proportional (P), integral (I), and derivative (D) part of the PID controller for yaw.

Preview

Aircraft Physics

AircraftPhysics is a component that applies the rotation and force values of the controller to a rigidbody. Torque and Speed are used to adapt the agent's velocity to the given scenario. Additionally, this component creates a lift based on the current velocity of the agent. If the agent is faster than MinAirborneVelocity, the generated lift can compensate gravity.

Property Description
Torque Determines the maximum angular force which is applied. This parameter depends on the Angular Drag of the controller´s attached rigidbody.
Speed Determines the maximum linear force which is applied. This parameter depends on the Drag of the controller´s attached rigidbody.
MinAirborneVelocity Minimal velocity that is required to stay airborne (lift compensates gravity).
AircraftController Controller to obtain steering values.
Imprint