FRC2706 / 2023-2706-Fall-Poseidon

Reprogramming Poseidon from scratch in the offseason.
Other
3 stars 0 forks source link

Advanced Swerve Improvements #24

Open ErikCald opened 8 months ago

ErikCald commented 8 months ago

There are some advanced swerve improvements that I have been researching for awhile now. The first list will be very important because they are related to prevent carpet damage:

Some less critical ideas and improvements:

ErikCald commented 7 months ago
ErikCald commented 7 months ago

Fix singleton class issue. Only use SwerveSubsystem.getInstance() to get the subsytem

ErikCald commented 7 months ago

This equation was added into the ChassisSpeed object to account for skew:

Example for using the ChassisSpeed to account for skew: https://github.com/wpilibsuite/allwpilib/blob/6a2d3c30a6df21b841d3bce11c4e3d48f0282189/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervebot/Drivetrain.java#L62

ErikCald commented 7 months ago
ErikCald commented 7 months ago
ErikCald commented 6 months ago

Run setCANTimeout(500) after factory defaults but before doing any settings. Then run setCANTimeout(0) after all settings are completed but before burn flash. Example here: https://github.com/Mechanical-Advantage/RobotCode2023/blob/9884d13b2220b76d430e82248fd837adbc4a10bc/src/main/java/org/littletonrobotics/frc2023/subsystems/gripper/GripperIOSparkMax.java#L45

ErikCald commented 6 months ago

Super stretch goal for way later, prob after comp. Setup the swerve code ecosystem to transfer EASILY to students in future years who aren't as proficient in code. My ideas right now are to just add all the different gear ratios of SDS modules into the config, add code to handle inverted SDS modules, and put comments explaining certain necessary changes per year, stuff like the Translation2d for each module, etc.