Linear and angular speed (V, W) actuator¶
Motion controller using linear and angular speeds
This actuator reads the values of linear and angular speed and applies them to the robot as direct translation. The speeds provided are internally adjusted to the Blender time measure.
Configuration parameters for Linear and angular speed (V, W) actuator¶
You can set these properties in your scripts with <component>.properties(<property1>=..., <property2>=...)
.
ControlType
(string, default:"Velocity"
)Kind of control, can be one of [‘Velocity’, ‘Position’]
Data fields¶
This actuator reads these datafields at each simulation step:
v
(float, initial value:0.0
)linear velocity in x direction (forward movement) (m/s)
w
(float, initial value:0.0
)angular velocity (rad/s)
Interface support:
moos
as db entries (morse.middleware.moos.motion.MotionReader
)socket
as straight JSON deserialization (morse.middleware.socket_datastream.SocketReader
)pocolibs
as GENPOS_CART_SPEED (morse.middleware.pocolibs.actuators.genpos.GenPosPoster
)yarp
as yarp::Bottle (morse.middleware.yarp_datastream.YarpReader
)ros
as TwistReader (morse.middleware.ros.motion_vw.TwistReader
)
Services for Linear and angular speed (V, W) actuator¶
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
stop()
(blocking)Stop the robot
Internally, it sets (v, w) to (0.0, 0.0)
get_properties()
(blocking)Returns the properties of a component.
Return value
a dictionary of the current component’s properties
set_speed(v, w)
(blocking)Modifies v and w according to the parameters
- Parameters
v
: desired linear velocity (meter by second)w
: desired angular velocity (radian by second)
get_configurations()
(blocking)Returns the configurations of a component (parsed from the properties).
Return value
a dictionary of the current component’s configurations
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
motionvw = MotionVW()
# place your component at the correct location
motionvw.translate(<x>, <y>, <z>)
motionvw.rotate(<rx>, <ry>, <rz>)
robot.append(motionvw)
# define one or several communication interface, like 'socket'
motionvw.add_interface(<interface>)
env = Environment('empty')
Other sources of examples¶
(This page has been auto-generated from MORSE module morse.actuators.v_omega.)