open class MecanumDrive : DriveMotors
Class representing four DcMotors that comprise a Mecanum drive; in other words, the drive we're using on our robot.
open class Motor
Class representing a motor used in a mecanum drive. |
|
class PowerBehavior
An enum representing what to do when a power exceeds a motor's limits. |
|
class TurnBehavior
An enum representing how turning should be calculated. |
MecanumDrive(motors: Array<Motor>)
Constructs a MecanumDrive using the specified set of motors |
var powerBehavior: PowerBehavior
What to do when a power exceeds a motor's limits. |
open fun forwardWithPower(power: Double): Unit |
|
open fun forwardWithSpeed(power: Double): Unit |
|
open fun getMotors(): Array<DcMotor> |
|
open fun move(power: Double, vector: Vector2D, turn: Double, turnBehavior: TurnBehavior): Unit
Moves in a given direction at a given power while turning towards a given direction open fun move(power: Double, vector: Vector2D, turn: Double): Unit
Moves in a given direction at a given power while turning towards a given direction. Uses MULTIPLY for the turn behavior. |
|
open fun reset(): Unit
Stops and resets each of the motors and their encoders. |
|
open fun setMotorMode(mode: RunMode): Unit
Sets each of the drive's motors to a given mode. |
|
open static fun standard(hardwareMap: HardwareMap): MecanumDrive
Given only a hardware map, constructs a ready-to-use mecanum drive with preset motors. |
|
open fun steerWithPower(power: Double, turn: Double): Unit |
|
open fun steerWithSpeed(speed: Double, turn: Double): Unit |
|
open fun stop(): Unit |
|
open fun strafeLeftWithPower(power: Double): Unit
Strafes left at a given power (i.e. without encoder). |
|
open fun strafeLeftWithSpeed(speed: Double): Unit
Strafes left at a given speed (i.e. with encoder). |
|
open fun strafeRightWithPower(power: Double): Unit
Strafes right at a given power (i.e. without encoder). |
|
open fun strafeRightWithSpeed(speed: Double): Unit
Strafes right at a given speed (i.e. with encoder). |