Native Mecanum Drivetrain
A mecanum drivetrain—this doesn't require odometry, hence it being "native" by not relying on external libraries. If you have odometry, use MecanumDrivetrain.
Controls: Right joystick controlls rotation. Left joystick controlls forward/backward/left/right movement. Controller 1 has full power. Controller 2 has reduced power (for finer control)
Parameters
drivetrain Map Mode
The motor layout of the drivetrain.
use Expansion Hub
Whether or not to use the expansion hub to get the motors. Requires that the expansion hub motors be initialized before use
field Centric
Whether or not to use field centric controls. The imu must be initialized prior to use.
is Rot Inverted
Whether or not to invert the rotation controls. Required for our second robot.
Constructors
Link copied to clipboard
public NativeMecanumDrivetrain NativeMecanumDrivetrain(DrivetrainMapMode drivetrainMapMode, Boolean useExpansionHub)
public NativeMecanumDrivetrain NativeMecanumDrivetrain(DrivetrainMapMode drivetrainMapMode, Boolean useExpansionHub, Boolean fieldCentric, Boolean isRotInverted)