public class MecanumControlLayout extends java.lang.Object implements ControlLayout
MecanumControlLayout
is a ControlLayout
that can control a robot with
a mecanum drive system. There is no 'standard' accepted way to control a mecanum drive
system, but in this implementation, the y-axis of the left thumbstick is responsible
for forward/backward movement, the x-axis of the left thumbstick is responsible for
left/right strafing movement, and the x-axis of the right thumbstick controls
clockwise/counter-clockwise rotation of the robot.Constructor and Description |
---|
MecanumControlLayout() |
Modifier and Type | Method and Description |
---|---|
double |
getClockwisePower(Joystick joy)
Gets the clockwise power that should be sent to the robot based on the current
state of the given joystick.
|
double |
getForwardPower(Joystick joy)
Gets the forward power that should be sent to the robot based on the current
state of the given joystick.
|
double |
getRightStrafePower(Joystick joy)
Gets the right strafe power that should be sent to the robot based on the current
state of the given joystick.
|
public double getForwardPower(Joystick joy)
ControlLayout
getForwardPower
in interface ControlLayout
joy
- the joystick to use for power calculations.public double getClockwisePower(Joystick joy)
ControlLayout
getClockwisePower
in interface ControlLayout
joy
- the joystick to use for power calculations.public double getRightStrafePower(Joystick joy)
joy
- the joystick to use for power calculations.