Quote:
Originally Posted by Djur
Ah. Then I should just add that by setting FL, RL, FR, RR to the same value will make the robot turn. Positive values turn the robot clockwise, negative values turn it counterclockwise (assuming the motors are hooked up correctly).
Very simple example use for turning:
Code:
boolean turnRightAtFullSpeed = true;
if(turnRightAtFullSpeed)
jaguarDrive(1, 1, 1, 1);
|
If you want full 3 degree of freedom control (rotate while translating), you should either use the provided WPI library codes for mecanum, or do something like this:
Code:
"y" is the forward command
"x" is the strafe right command
"z" is the rotate clockwise command
Step1:
Compute the 4 wheel speeds:
FL = y + x + z
FR = y - x - z
RL = y - x + z
RR = y + x - z
Step2:
Find the max absolute value of the above four commands,
and if it is greater than 1,
divide all four commands by that max absolute value.