Force/Torque Motion Controller ============================== **Motion controller using force and torque** This class will read force and torque as input from an external middleware. The forces and torques are transformed from the actuator frame to the parent robot frame and then applied to the robot blender object. If the property RobotFrame is set to True it will be applied directly in the robot frame without changes. .. cssclass:: properties morse-section Configuration parameters for Force/Torque Motion Controller ----------------------------------------------------------- You can set these properties in your scripts with ``.properties(=..., =...)``. - ``RobotFrame`` (bool, default: ``False``) If set to true the inputs are applied in the Robot coordinate frame instead of the actuator frame. .. cssclass:: fields morse-section Data fields ----------- This actuator reads these datafields at each simulation step: - ``force`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) force along x, y, z - ``torque`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) torque around x, y, z *Interface support:* - :tag:`ros` as `geometry_msgs/Wrench `_ (:py:mod:`morse.middleware.ros.force_torque.WrenchReader`) - :tag:`yarp` as yarp::Bottle (:py:mod:`morse.middleware.yarp_datastream.YarpReader`) - :tag:`socket` as straight JSON deserialization (:py:mod:`morse.middleware.socket_datastream.SocketReader`) .. cssclass:: services morse-section Services for Force/Torque 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 forcetorque = ForceTorque() # place your component at the correct location forcetorque.translate(, , ) forcetorque.rotate(, , ) robot.append(forcetorque) # define one or several communication interface, like 'socket' forcetorque.add_interface() env = Environment('empty') .. cssclass:: files morse-section Other sources of examples +++++++++++++++++++++++++ - `Source code <../../_modules/morse/actuators/force_torque.html>`_ - `Unit-test <../../_modules/base/force_torque_testing.html>`_ *(This page has been auto-generated from MORSE module morse.actuators.force_torque.)*