Drag ==== **Actuator allowing to simulate the drag force** This actuator allows to simulate the drag force, or fluid resistance. It is not controlable, as it depends only of robot parameters, and environment. The drag force is generally written as: Fd = 0.5 * rho * vel_sq * A * Cd where - rho is the density of the fluid (env dependant) - A is the cross sectional area (robot dependent) - Cd is the drag coefficient, related to the object shape and the Reynolds Number All these values are aggregated into the property DragCoeff, to ease the configuration of the component. .. cssclass:: properties morse-section Configuration parameters for Drag --------------------------------- You can set these properties in your scripts with ``.properties(=..., =...)``. - ``DragCoeffX`` (floatAn aggregated value to scale the drag force on X robot axis, default: ``0.09``) (no documentation available yet) - ``DragCoeffY`` (floatAn aggregated value to scale the drag force on Y robot axis, default: ``0.09``) (no documentation available yet) - ``DragCoeffZ`` (floatAn aggregated value to scale the drag force on Z robot axis, default: ``0.5``) (no documentation available yet) .. cssclass:: fields morse-section Data fields ----------- No data field documented (see above for possible notes). .. cssclass:: services morse-section Services for Drag ----------------- - ``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 drag = Drag() # place your component at the correct location drag.translate(, , ) drag.rotate(, , ) robot.append(drag) # define one or several communication interface, like 'socket' drag.add_interface() env = Environment('empty') .. cssclass:: files morse-section Other sources of examples +++++++++++++++++++++++++ - `Source code <../../_modules/morse/actuators/drag.html>`_ - `Unit-test <../../_modules/base/drag_testing.html>`_ *(This page has been auto-generated from MORSE module morse.actuators.drag.)*