TankDrive

constructor(@NonNull driveModel: DriveModel, @NonNull motionProfile: MotionProfile, @NonNull tankGains: TankGains, @NonNull leftMotors: List<DcMotor>, @NonNull rightMotors: List<DcMotor>, @NonNull lazyImu: LazyImu, @NonNull voltageSensorMapping: HardwareMap.DeviceMapping<VoltageSensor>, @NonNull startPose: Pose2d)

Create a new TankDrive.

Parameters

driveModel

the drive model parameters

motionProfile

the motion profile parameters

tankGains

the tank gains parameters

leftMotors

all motors on the left side of the robot (e.g. Arrays.asList(leftFront, leftBack))

rightMotors

all motors on the right side of the robot (e.g. Arrays.asList(rightFront, rightBack))

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 tankGains: TankGains, @NonNull leftMotors: List<DcMotor>, @NonNull rightMotors: List<DcMotor>, @NonNull lazyImu: LazyImu, @NonNull voltageSensorMapping: HardwareMap.DeviceMapping<VoltageSensor>)

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

Parameters

driveModel

the drive model parameters

motionProfile

the motion profile parameters

tankGains

the tank gains parameters

leftMotors

all motors on the left side of the robot (e.g. Arrays.asList(leftFront, leftBack))

rightMotors

all motors on the right side of the robot (e.g. Arrays.asList(rightFront, rightBack))

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