This actuator reads the values of linear and angular speed and applies them to the robot as speeds for the wheels. It only works with robots of the type WheeledRobot, such as the Segway RMP 400 and the Pioneer 3-DX. The movement of the robot is more realistic, but also depends on more factors, such as the friction between the wheels and the surface.
The speeds for the left and right wheels are calculated as:
left_speed = (v - e w) / R
right_speed = (v + e w) / R
Where:
set_speed: (synchronous service) Modifies v and w according to the parameters given.
Parameters
v
float
w
float
Parameters: (v, w)
stop: (synchronous service) Stop the robot (sets v and w to 0.0)
No available modifiers
This kind of actuator should only be added to a robot created from the WheeledRobot class, such as the Segway RMP 400 robot.
from morse.builder.morsebuilder import *
# Append Segway robot to the scene
robot = WheeledRobot('segwayrmp400')
robot.unparent_wheels()
# Add the actuator
motion = Actuator('v_omega_diff_drive')
robot.append(motion)