The Drivetrain
Introduction
The tank drivetrain is tried and tested, even by us! During Prototyping we experimented with our kitbot drivetrain and used it as a solid base to train new members with.
The drivetrain is a 3x3 tank drive base, with all wheels powered, and the first two being omnidirectional.
The drivetrain’s top speed is estimated to be 45kts. Although it has not yet been in wide enough area to confirm.
Prototyping
In the pre season we prototyped using our kitbot and counterweights.
Software
The drive base uses simple two wheel steering kinematics and an odometry with encoders, gyro and accelerometers to detect robot position.
Config Files
drivetrain:
max_velocity: 1.5 # Updated Never by Nobody
encoderConversionFactor: 21.43 # Updated 1/27 by Joe
# All pose coordinates are in meters.
leftMotor:
Motor1Port: 2 # Updated 1/12 by Keegan
Motor2Port: 1 # Updated 1/12 by Keegan
EncoderPorts: [2, 1] # Updated 2/12 by Keegan
EncoderReversed: False # Updated Never by Nobody
Inverted: False # Updated Never by Nobody
rightMotor:
Motor1Port: 3 # Updated 1/8 by Keegan
Motor2Port: 4 # Updated 1/8 by Keegan
EncoderPorts: [3, 4] # Updated Never by Nobody
EncoderReversed: True # Updated Never by Nobody
Inverted: True # Updated Never by Nobody
navX: # NavX ids
can_id: 0 # Updated 1/13 by Keegan
yaw: 0 # Updated 1/13 by Keegan
pitch: 0 # Updated 1/13 by Keegan
roll: 0 # Updated 1/13 by Keegan
drive:
# Diff lock
kStabilizationP: 0.011
kStabilizationI: 0.0001
kStabilizationD: 0
# TurnToAngle
kTurnP: 0.007
kTurnI: 0.006
kTurnD: 0.001
kMaxTurnRateDegPerS: 100
kMaxTurnAccelerationDegPerSSquared: 300
kTurnToleranceDeg: 5
kTurnRateToleranceDegPerS: 10 # degrees per second