External Force/Torque¶
Force and torque generated by the environment
This class will read force and torque as input from an external middleware, and applys them to the associated robot in the global frame.
It allows to simulate impact of the environment on the robot, such as wind, flow, …
Configuration parameters for External Force/Torque¶
No configurable parameter.
Data fields¶
This actuator reads these datafields at each simulation step:
force
(vec3<float>, initial value:[0.0, 0.0, 0.0]
)- force along x, y, z
torque
(vec3<float>, initial value:[0.0, 0.0, 0.0]
)- torque around x, y, z
Interface support:
socket
as straight JSON deserialization (morse.middleware.socket_datastream.SocketReader
)yarp
as YarpReader (morse.middleware.yarp_datastream.YarpReader
)ros
as geometry_msgs/Wrench (morse.middleware.ros.force_torque.WrenchReader
)
Services for External Force/Torque¶
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
externalforce = ExternalForce()
# place your component at the correct location
externalforce.translate(<x>, <y>, <z>)
externalforce.rotate(<rx>, <ry>, <rz>)
robot.append(externalforce)
# define one or several communication interface, like 'socket'
externalforce.add_interface(<interface>)
env = Environment('empty')
Other sources of examples¶
(This page has been auto-generated from MORSE module morse.actuators.external_force.)