GRT Logo

Controls

The GRT controls subgroup is responsible for the crucial electrical components, wiring, and software for our robots. Controls collaborates with the mechanism and drivetrain teams to incorporate necessary sensors and controlling hardware for motors and pneumatic devices. Wiring the components requires technical skills including crimping, soldering, and troubleshooting.

Since the 2019 season, controls has written its software in Java, a language officially supported by FIRST. All code written for competitions and outreach events are available at https://github.com/grt192.

Swerve drive software

A historical achievement of the controls subgroup was software controlling the robot's omnidirectional "swerve" drive. In 2017, GRT developed a swerve drivetrain with four omnidirectional gearboxes to control robot motion. This drive system required a much more complex control system due to additional degrees of freedom created by four rotating and translating gearboxes. The controls team installed VEX Robotics VersaPlanetary encoders on each gearbox module to control the angle of the wheel, and limit switches for real-time zeroing. The driver was given the option for Ackerman steering, a control scheme similar to but more sophisticated than previous GRT drive control systems, and strafing, in which the robot moves in any direction without changing orientation, allowing the driver to quickly move across the field around defense robots and then make accurate movements to score points.

Swerve code

2023 preseason swerve code

Since 2017, GRT controls members have refined and improved our swerve code based on competition performance.

Vision control

In 2016, GRT developed a robot vision system using OpenCV to detect the goals (marked by reflective tape on the field). During autonomous control, this vision system helped us consistently score high goal shots, and during teleop it improved driver control of the shooting mechanism by aiming and firing at the press of a single button.

Vision testing

Controls members test their vision software using reflective tape, 2017

In later years, GRT worked on further expanding the vision system, using Kalman filters to combine data from computer vision and drivetrain sensors to accurately estimate the robot's position on the field. In 2019, this allowed the drivers to use a touchscreen monitor to view and control the robot's position. In 2020, controls incorporated a Jetson Nano coprocessor to offload expensive vision and lidar processing, communicating with and streaming data to the main processor over network tables on an ethernet connection. In 2022, vision processing on the Jetson provided ground-truth data to the turret mechanism for hub locking.

Electrical systems

In addition to writing software, controls is responsible for wiring, integrating, and troubleshooting all the electrical components aboard the robot. The most important component (the "brain") on the robot is the AndyMark roboRIO, the main computer that stores and runs all of the robot's code. To keep all of our components powered, a REV PDP or PDH (power distribution panel or hub respectively) takes power from the battery and distributes it to the RIO, radio, and our SparkMax and TalonSRX motor controllers and pneumatics.

Wiring

A controls member checks wiring on the robot, 2017