Skip to content

4698RaiderRobotics/Swerve-2022

Repository files navigation

CI

Swerve-2022

Offseason 2022 swerve drive

The swerve drive has three vector controls, x, y, and omega (angular velocity). Straight forward is positive x direction, straight left is positive y direction, and counter-clockwise is positive omega. The ChassisSpeeds object stores these three values in one object. The robot takes in the joystick commands for x speed, y speed, and omega (rotational) speed and adds them to a ChassisSpeeds object. The ChassisSpeeds values are robot relative, meaning positive x is forward on the robot. They can be changed to field relative, meaning positive x is directly away from you, with a gyro. The ChassisSpeeds object is then split up into an array of 4 individual SwerveModuleStates objects using the SwerveDriveKinematics class. These SwerveModuleStates can be sent to each individual swerve module and the motors can be set using this.

More information can be found at this blog and this video.

About

Offseason 2022 swerve drive

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages