Orientation Actuator ==================== **An actuator to change robot orientation.** Motion controller changing the robot orientation. This actuator reads the values of angles of rotation around the 3 axis and applies them to the associated robot. This rotation is applied with the speed provided in properties. For backward compatibility reasons, the default speed is infinite, so the rotation is instantaneous. Angles are expected in radians. .. cssclass:: properties morse-section Configuration parameters for Orientation Actuator ------------------------------------------------- You can set these properties in your scripts with ``.properties(=..., =...)``. - ``speed`` (float, default: ``inf``) Rotation speed, in radian by sec - ``tolerance`` (float, default: ``0.02``) Tolerance in radian to decide if the robot has reached the goal - ``ControlType`` (string, default: ``"Velocity"``) Kind of control, can be one of ['Velocity', 'Position'] .. cssclass:: fields morse-section Data fields ----------- This actuator reads these datafields at each simulation step: - ``yaw`` (float, initial value: ``Initial robot yaw``) Rotation of the robot around Z axis, in radian - ``pitch`` (float, initial value: ``Initial robot pitch``) Rotation of the robot around Y axis, in radian - ``roll`` (float, initial value: ``Initial robot roll``) Rotation of the robot around X axis, in radian *Interface support:* - :tag:`ros` as `geometry_msgs/Quaternion `_ (:py:mod:`morse.middleware.ros.orientation.QuaternionReader`) - :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`) .. cssclass:: services morse-section Services for Orientation Actuator --------------------------------- - ``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 orientation = Orientation() # place your component at the correct location orientation.translate(, , ) orientation.rotate(, , ) robot.append(orientation) # define one or several communication interface, like 'socket' orientation.add_interface() env = Environment('empty') .. cssclass:: files morse-section Other sources of examples +++++++++++++++++++++++++ - `Source code <../../_modules/morse/actuators/orientation.html>`_ - `Unit-test <../../_modules/base/orientation_testing.html>`_ *(This page has been auto-generated from MORSE module morse.actuators.orientation.)*