Header containing a general use PID class.
Header containing the TankDrive class.
Header containing several Unit classes.
Header containing the 2d Vector class.
A Utility Unit class for Angles.
A Utility Unit class for Length.
void turnForPID(Angle target)
Turns for a specified angle (and stops)
void turnToPID(Angle target)
Turns tp a specified angle (and stops)
SmartDrive & withTurnForPID(PID pid)
Sets the PID object for the turnForPID Method.
Angle m_LastLeftPos
The last angle read from the Left motors.
Angle m_dir
Stores the current heading of the robot.
PID m_driveForPID
The PID object for the driveFor Method.
HorizontalTracker m_tracker
Stores the Horizontal Tracker.
Angle getRightTravel()
Gets the Angle traveled by the left motors.
SmartDrive & withTurnToPID(PID pid)
Sets the PID object for the turnToPID Method.
Vec2 m_pos
Stores the Position of the robot.
double m_gearRatio
A double representing the gear ratio of the drivetrain.
SmartDrive(TankDrive drive, vex::inertial inert)
Construct a new Smart Drive object.
Angle getLeftTravel()
Gets the Angle traveled by the left motors.
Angle m_LastRightPos
The last angle read from the Right motors.
Length getWheelTravel()
Get the Travel of the wheels for one revolution of the motor.
SmartDrive & withGearRatio(double ratio)
Sets the gear ratio of the drivetrain.
SmartDrive & withWheelSize(Length size)
Sets the wheel size of the Smart Drive.
int track()
Continuously tracks and updates the position of the SmartDrive.
vex::inertial m_inert
Stores the inertial sensor object.
Length m_wheelSize
A Length representing the diameter of the wheel.
PID m_turnForPID
The PID object for the turnForPID Method.
SmartDrive & withHorizontalTracker(vex::rotation rotation, Length wheelSize, double gearRatio)
Add Horizontal Tracker to the SmartDrive.
Vec2 m_centerPos
Stores the Center Position of the robot.
void turnFor(Angle target, double speed)
Turns for a specified Angle.
SmartDrive & withDriveForPID(PID pid)
Sets the PID object for the driveForPID Method.
PID m_turnToPID
The PID object for the turnToPID Method.
void turnTo(Angle target, double speed)
Turns to a specified field-centric Angle.
void driveFor(Length target, double speed)
Drives for a specified distance.
void driveForPID(Length target)
Drives for a specified distance (and stops)
A Simple TankDrive class.
Length Inches(double inches)
Constructs a Length from Inches.
A struct for tracking the robot's lateral displacement.
Length m_wheelSize
A Length representing the diameter of the wheel.
Angle m_travelAngle
Stores the change in angle since the last call of getTravel()
HorizontalTracker()
Construct an empty Horizontal Tracker object.
Angle m_lastAngle
Stores the last angle recorded from the encoder.
double m_gearRatio
A double representing the gear ratio of the tracker.
Length getTravel()
Get the distance traveled by the Horizontal Tracker.
Length m_offset
Stores a Length representing the vertical distance from horizontal tracker to the tracking center (po...
Length m_travelDistance
Stores the distance traveled.
std::shared_ptr< vex::rotation > m_rotation
A Pointer to a rotation sensor object.
A Utility 2D Vector class.