Professional Documents
Culture Documents
This is a high level wheel control API using the motor and quad primitives to
drive the robot.
Data Types:
typedef float meterPerSec;
typedef float radPerSec;
typedef float meter;
typedef float radians;
typedef struct
{ meter x;
meter y;
radians phi;
} PositionType;
typedef struct
{ meterPerSec v;
radPerSec w;
} SpeedType;
int VWStartControl (VWHandle handle, float Vv, float Tv, float Vw, float Tw);
Input: (handle) ONE VWHandle
(Vv) the parameter for the proportional component of the
v-controller
(Tv) the parameter for the integrating component of the
v-controller
(Vw) the parameter for the proportional component of the
w-controller
(Tv) the parameter for the integrating component of the
w-controller
Output: 0 = ok
-1 = error wrong handle
Semantics: Enable the PI-controller for the vw-interface and set
the parameters.
As default the PI-controller is deactivated when the
vw-interface is initialized. The controller tries to keep the
desired speed (set with VWSetSpeed) stable by adapting the
energy of the involved motors.
The parameters for the controller have to be choosen carefully!
The formula for the controller is:
t
new(t) = V*(diff(t) + 1/T * diff(t)dt )
0
V: a value usually around 1.0
T: a value usually between 0 and 1.0
After enabling the controller the last set speed (VWSetSpeed)
is taken as the speed to be held stable.
Tactile bumpers and infrared proximity sensors have been used in some previous
robot models. They are currently not used for the SoccerBots, but may be used,
e.g. for integrating additional sensors.