Framework Overview

Toronto Robot Framework

The Toronto Robot Framework includes the TorontoJar project and the TorontoRobot project.

The Toronto Robot extends the wpilib Command Based robot example class to support a robot with Left/Right (west coast) drive, with encoders on each side, and a gyro.

The Toronto Jar adds example code to read from a Joystick or GameController and creates a more helpful Gyro interface.

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

Controllers and Joysticks

Sensors

Command Layer

Default Driving Commands

Useful Auto Commands

Subsystem Layer

Subsystem Definition

  • T_Subsystem

Links to

  • RobotMap
  • RobotConst

Utility Classes

  • T_PID_Controller

Motors

  • T_Motor
  • T_MotorWithLimits

Vision Processing for 2018