Rotorcraft attitude motion controller ===================================== **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. .. note:: Angle are given in aerospace North East Down convention (NED) .. cssclass:: properties morse-section Configuration parameters for Rotorcraft attitude motion controller ------------------------------------------------------------------ You can set these properties in your scripts with ``.properties(=..., =...)``. - ``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 - ``LinearThrust`` (bool, default: ``True``) 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) - ``YawRateControl`` (bool, default: ``True``) If set to true, the robot is controlled in YawRate, otherwise yaw is considered directly as the order - ``UseAngleAgainstNorth`` (bool, default: ``False``) 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 .. cssclass:: fields morse-section 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``) If YawRateControl yaw rate in radians/sec, otherwise yaw angle in radian - ``thrust`` (float, initial value: ``0.0``) collective thrust: 0 .. 1 (= 0 .. 100%) *Interface support:* - :tag:`ros` as `std_msgs/Float32MultiArray `_ (:py:mod:`morse.middleware.ros.rotorcraft_attitude.RotorcraftAttitudeReader`) - :tag:`socket` as straight JSON deserialization (:py:mod:`morse.middleware.socket_datastream.SocketReader`) - :tag:`yarp` as yarp::Bottle (:py:mod:`morse.middleware.yarp_datastream.YarpReader`) - :tag:`mavlink` as `SET_ATTITUDE_TARGET `_ (:py:mod:`morse.middleware.mavlink.read_attitude_target.AttitudeTarget`) .. cssclass:: services morse-section Services for Rotorcraft attitude motion controller -------------------------------------------------- - ``get_properties()`` (blocking) Returns the properties of a component. - Return value a dictionary of the current component's properties - ``set_property(prop_name, prop_val)`` (blocking) Modify one property on a component - Parameters - ``prop_name``: the name of the property to modify (as shown the documentation) - ``prop_val``: the new value of the property. Note that there is no checking about the type of the value so be careful - Return value nothing - ``get_configurations()`` (blocking) Returns the configurations of a component (parsed from the properties). - Return value a dictionary of the current component's configurations .. cssclass:: examples morse-section Examples -------- The following examples show how to use this component in a *Builder* script: .. code-block:: python 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(, , ) rotorcraftattitude.rotate(, , ) robot.append(rotorcraftattitude) # define one or several communication interface, like 'socket' rotorcraftattitude.add_interface() env = Environment('empty') .. cssclass:: files morse-section Other sources of examples +++++++++++++++++++++++++ - `Source code <../../_modules/morse/actuators/rotorcraft_attitude.html>`_ - `Unit-test <../../_modules/base/rotorcraft_attitude_testing.html>`_ *(This page has been auto-generated from MORSE module morse.actuators.rotorcraft_attitude.)*