todo-2017

Toronto Robot Framework

The Toronto Robot example class T_Robot extends the WPILIB Iterative Robot. It adds example code to read from a Joystick or GameController and drive the robot using a Left/Right drive with encoder feedback and an analog gyro.

The example code uses Proportional Feedback Control (PID - P only) to control the speed of the robot motors precisely using encoder feedback for each drive motor.

Gyro feedback examples show how to control the robot direction using a gyro for accurate autonomous tracking.

Various commands are illustrated as building blocks for a complete autonomous including:

  • Driving to a specific encoder distance
  • Driving until a sensed value is reached (ultrasonic distance or proximity sensor)
  • Turn to face an angle using the gyro
  • Drive in a specific compass heading using the gyro

The frameworks have built in routines to organize the code that updates the SmartDashboard

Operator Control Layer

Operator Input

  • T_OI (low)
  • T_AutoChooser (low)
  • T_Toggle (Brendan)

Controllers and Joysticks

  • T_GameController
    • T_LogitechGameController
    • T_XBoxGameController (Syed)
    • T_PS4GameController (Rishab)
  • T_JoystickController
    • T_LogitechJoystickController

Sensors

  • T_Gyro (Stuart D.)

Command Layer

Default Driving Commands

  • T_GameControllerDriveCommand (Maninder)
  • T_JoystickDriveCommand

Useful Commands

  • T_DriveToDistance - encoder
  • T_DriveToDistanceOnHeading - gyro, ultrasonic, encoder (Stuart)
  • T_DriveToUltrasonicOnHeadingCommand - (Yu Ying)
  • T_DriveToSensorOnHeading
  • T_TurnToAngle (Stuart D.)
  • T_DriveForSeconds
  • T_DriveForSecondsOnHeading

Subsystem Layer

Subsystem Definition

  • T_Subsystem

Links to

  • RobotMap
  • RobotConst

Utility Classes

  • T_PID_Controller

Motors

  • T_Motor
  • T_MotorWithLimits

Vision Processing for 2017