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.

Configuration parameters for Drag

You can set these properties in your scripts with <component>.properties(<property1>=..., <property2>=...).

  • 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)

Data fields

No data field documented (see above for possible notes).

Services for Drag

  • get_configurations() (blocking)

    Returns the configurations of a component (parsed from the properties).

    • Return value

      a dictionary of the current component’s configurations

  • 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

Examples

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
drag = Drag()

# place your component at the correct location
drag.translate(<x>, <y>, <z>)
drag.rotate(<rx>, <ry>, <rz>)

robot.append(drag)

# define one or several communication interface, like 'socket'
drag.add_interface(<interface>)

env = Environment('empty')

Other sources of examples

(This page has been auto-generated from MORSE module morse.actuators.drag.)