Motion controller using force and torque to achieve desired attitude.
This actuator reads roll,pitch, yaw rate (or yaw, depending the control mode) 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. In YawRateControl, the yaw-rate input is integrated to yield an absolute yaw setpoint for the controller, otherwise yaw is considered directly as the order. Thrust is directly applied as force in z-direction of the robot.
Angle are given in aerospace North East Down convention (NED)
You can set these properties in your scripts with <component>.properties(<property1>=..., <property2>=...).
proportional gain for roll/pitch control
derivative gain for roll/pitch control
(no documentation available yet)
derivative gain for yaw control
multiplication factor for applied thrust force in N
If set to true, the force thrust is linear w.r.t. the collective thrust input (Force = ThrustFactor*thrust). If set to false, the force thrust is quadratic w.r.t. the collective thrust input (Force = ThrustFactor*thrust^2)
If set to true, the robot is controlled in YawRate, otherwise yaw is considered directly as the order
If set to true, return the absolute yaw against North. The whole geodetic coordinates (longitude, latitude, altitude, angle_against_north) must be configured. Otherwise, return the yaw against the Blender coordinates
This actuator reads these datafields at each simulation step:
roll angle in radians
pitch angle in radians
If YawRateControl yaw rate in radians/sec, otherwise yaw angle in radian
collective thrust: 0 .. 1 (= 0 .. 100%)
Returns the properties of a component.
a dictionary of the current component’s properties
Modify one property on a component
Returns the configurations of a component (parsed from the properties).
a dictionary of the current component’s configurations
The following examples show how to use this component in a Builder script:
from morse.builder import * # adds a default robot (the MORSE mascott!) robot = Morsy() # 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(rotorcraftattitude) # define one or several communication interface, like 'socket' rotorcraftattitude.add_interface(<interface>) env = Environment('empty')