frc2423 / 2023

MIT License
1 stars 0 forks source link

Swerve Resources

5550 swerve chiefdelphi thread: https://www.chiefdelphi.com/t/wcp-swerve-x-flipped-team-5550-journey/417237

5550 swerve code: https://drive.google.com/drive/folders/1DcgL5wzNB2xEuyDsv4Hjmz-NEp0VTeM_

WPILib swerve example code: https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervebot

Swerve odometry:

https://docs.wpilib.org/en/stable/docs/software/kinematics-and-odometry/swerve-drive-odometry.html https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/math/kinematics/SwerveDriveOdometry.html

Swerve Kinematics:

https://docs.wpilib.org/en/stable/docs/software/kinematics-and-odometry/swerve-drive-kinematics.html https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/math/kinematics/SwerveDriveKinematics.html

Motor code:

Code to create motor controller objects (copy this into your project): https://github.com/frc2423/2022/blob/main/competition/src/main/java/frc/robot/devices/NeoMotor.java

REVLib library (needed for controlling motors): https://docs.revrobotics.com/sparkmax/software-resources/spark-max-api-information#c++-and-java

Controls

Acceleration (Slew Rate Limiting): https://docs.wpilib.org/en/stable/docs/software/advanced-controls/filters/slew-rate-limiter.html

Deadband: https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/math/MathUtil.html#applyDeadband(double,double)

Xbox Controller: https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/wpilibj/XboxController.html