Skip to content

FRC830/2023Robot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swerve (for Scrappy the Robot)

C++ code for swerve drive: 2x SPARK MAX/NEO plus SRX MAG ENCODER per swerve module (i.e SDS Swerve Module); with Test Mode code.

See SwerveSensorInterfaceBoard for details on electrical connections.

Here are some of the features implemented in this code:

  • Handling PWM input from SRX MAG ENCODER to derive absolute position;
  • Handling SPARK MAX motor controllers;
  • Profiled PID control of turning position;
  • Using turning position to override commanded drive, when modules are not facing in commanded direction;
  • Distance and velocity Profiled PID control of drive motors;
  • Test Mode includes interactive adjustment of PID settings;
  • Error handling for motor controllers, up to being able to test code on a roboRIO with no motor controllers;
  • Test Mode uses Shuffleboard to create a tab for each swerve module, and a tab for the overall swerve drive;
  • Step-by-step bring up procedure for swerve modules and drive system is documented in block comments (in SwerveModule.h);
  • Provides several Test Mode routines to automatically have robot drive various fixed test patterns;
  • Logic to manage and save configuration of motor controller settings;
  • Primitives useful for autonomous driving;
  • Integrated with WPILib.

Please see (and/or use) shuffleboard.json for suggested Shuffleboard settings.

alt text

alt text

##Vision ig To update vision setting in terms of pipeline tuning data. Click export settings and wait for the download of the .zip file. Disconnect from the radio. connect to the radio conncted the new pi we want the setting to be on. Than click import setting and all that stuff

About

C++ code for the FRC830 2023 robot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%