MecanumDrive

constructor(@NonNull driveModel: DriveModel, @NonNull motionProfile: MotionProfile, @NonNull mecanumGains: MecanumGains, @Nullable leftFront: DcMotor, @Nullable leftBack: DcMotor, @Nullable rightBack: DcMotor, @Nullable rightFront: DcMotor, @Nullable lazyImu: LazyImu, @NonNull voltageSensorMapping: HardwareMap.DeviceMapping<VoltageSensor>, @NonNull startPose: Pose2d)

Create a new MecanumDrive.

Parameters

driveModel

the drive model parameters

motionProfile

the motion profile parameters

mecanumGains

the mecanum gains parameters

leftFront

the front left motor

leftBack

the back left motor

rightBack

the back right motor

rightFront

the front right motor

lazyImu

the LazyImu instance to use, see the getLazyImu method of RobotConfig to construct this

voltageSensorMapping

the voltage sensor mapping for the robot as returned by hardwareMap.voltageSensor

startPose

the starting pose of the robot


constructor(@NonNull driveModel: DriveModel, @NonNull motionProfile: MotionProfile, @NonNull mecanumGains: MecanumGains, @Nullable leftFront: DcMotor, @Nullable leftBack: DcMotor, @Nullable rightBack: DcMotor, @Nullable rightFront: DcMotor, @Nullable lazyImu: LazyImu, @NonNull voltageSensorMapping: HardwareMap.DeviceMapping<VoltageSensor>)

Create a new MecanumDrive that will start at the last known pose.

Parameters

driveModel

the drive model parameters

motionProfile

the motion profile parameters

mecanumGains

the mecanum gains parameters

leftFront

the front left motor

leftBack

the back left motor

rightBack

the back right motor

rightFront

the front right motor

lazyImu

the LazyImu instance to use, see the getLazyImu method of RobotConfig to construct this

voltageSensorMapping

the voltage sensor mapping for the robot as returned by hardwareMap.voltageSensor