Skip to content

Chassis

johnmeshulam edited this page Nov 10, 2019 · 3 revisions

The RobotChassis class is an implementation of a basic robot chassis.

The RobotChassis can be used for any chassis:

  • With 2 large motors (They could be inverted!)
  • With a 1:1 gear ratio to the wheels

Defining a RobotChassis

To define a new RobotChassis, do not create the LargeMotors! Instead, use:

new RobotChassis(String leftMotorName, char leftMotorPort, String rightMotorName, char rightMotorPort, boolean isInverted);

(There are a few constructors, in case some parameters are not specified)

Accessing the RobotChassis

The chassis can be accessed with RobotMap.getChassis().

Which can then be used as follows:

RobotMap.getChassis.forwardDrive(1.0);

General Information

The chassis has a few driving functions that make sure both wheels are synchronized while moving. Speed can be set individually for each motor or collectively for both.

Clone this wiki locally