Rotorcraft attitude motion controller

Motion controller using force and torque to achieve desired attitude.

This actuator reads roll,pitch, yaw rate and thrust commands as e.g. used to manually control a quadrotor via RC or by higher level control loops. This controller is meant to be used by quadrotors and similar flying robots with Rigid Body physics in blender. It is a simple PD-controller which applies torques to the robot to change and control the attitude. The yaw-rate input is integrated to yield an absolute yaw setpoint for the controller. Thrust is directly applied as force in z-direction of the robot.

Note

Angle are given in aerospace North East Down convention (NED)

Configuration parameters for rotorcraft attitude motion controller

You can set these properties in your scripts with <component>.properties(<property1>=..., <property2>=...).

  • RollPitchPgain (float, default: 100.0)

    proportional gain for roll/pitch control

  • RollPitchDgain (float, default: 20.0)

    derivative gain for roll/pitch control

  • YawPgain (floatproportional gain for yaw control, default: 16.0)

    (no documentation available yet)

  • YawDgain (float, default: 4.0)

    derivative gain for yaw control

  • ThrustFactor (float, default: 40.0)

    multiplication factor for applied thrust force in N

Data fields

This actuator reads these datafields at each simulation step:

  • roll (float, initial value: 0.0)

    roll angle in radians

  • pitch (float, initial value: 0.0)

    pitch angle in radians

  • yaw (float, initial value: 0.0)

    yaw angle in radians

  • thrust (float, initial value: 0.0)

    collective thrust: 0 .. 1 (= 0 .. 100%)

Interface support:

Services for Rotorcraft attitude motion controller

This component does not expose any service.

Examples

The following example shows how to use this component in a Builder script:

from morse.builder import *

robot = ATRV()

# creates a new instance of the actuator
rotorcraftattitude = RotorcraftAttitude()

# place your component at the correct location
rotorcraftattitude.translate(<x>, <y>, <z>)
rotorcraftattitude.rotate(<rx>, <ry>, <rz>)

robot.append(%(var)s)

# define one or several communication interface, like 'socket'
rotorcraftattitude.add_interface(<interface>)

env = Environment('empty')

Other sources of examples

(This page has been auto-generated from MORSE module morse.actuators.rotorcraft_attitude.)