MecanumDriveWithRR
class MecanumDriveWithRR(hardwareMap: HardwareMap, var pose: Pose2d = Pose2d(Vector2d(0.0, 0.0), 0.0), params: MecanumDriveWithRR.DriveParams = DriveParams()) : MecanumDrivetrain
A mecanum drivetrain integrated with the RoadRunner library.
Parameters
hardwareMap
the hardware map
params
the drive parameters
Constructors
Link copied to clipboard
constructor(hardwareMap: HardwareMap, pose: Pose2d = Pose2d(Vector2d(0.0, 0.0), 0.0), params: MecanumDriveWithRR.DriveParams = DriveParams())
Types
Link copied to clipboard
Link copied to clipboard
class DriveParams(val logoFacingDirection: RevHubOrientationOnRobot.LogoFacingDirection = LogoFacingDirection.UP, val usbFacingDirection: RevHubOrientationOnRobot.UsbFacingDirection = UsbFacingDirection.FORWARD, val inPerTick: Double = 1.0, val lateralInPerTick: Double = inPerTick, val trackWidthTicks: Double = 0.0, val kS: Double = 0.0, val kV: Double = 0.0, val kA: Double = 0.0, val maxWheelVel: Double = 50.0, val minProfileAccel: Double = -30.0, val maxProfileAccel: Double = 50.0, val maxAngVel: Double = Math.PI, val maxAngAccel: Double = Math.PI, val axialGain: Double = 0.0, val lateralGain: Double = 0.0, val headingGain: Double = 0.0, val axialVelGain: Double = 0.0, val lateralVelGain: Double = 0.0, val headingVelGain: Double = 0.0)
Parameters for the robot's mecanum drive.
Link copied to clipboard
Link copied to clipboard
Properties
Functions
Link copied to clipboard
Create a new trajectory action builder.
Link copied to clipboard
Ensures the attachment is in the Idle state, throwing an exception if not.
Link copied to clipboard
Set the drive powers.
Link copied to clipboard
Link copied to clipboard
fun trajectory(from: Pose2d = localizer.pose, block: TrajectoryActionBuilder.() -> TrajectoryActionBuilder): Action
Build a trajectory action.