frc2423 / 2024

2024 build season code
MIT License
1 stars 0 forks source link

Swerve Code / Yet Another General Swerve Library (YAGSL) ⭐ #5

Closed tee-bee closed 7 months ago

awordforthat commented 8 months ago

Starting setup documentation:

0.0 You will need an installation of Java to complete this setup.

  1. The repo is located here: https://github.com/BroncBotz3481/YAGSL. This is just for reference, you don't need to go there yet.

  2. First, install the NavX library. Go here: https://pdocs.kauailabs.com/navx-mxp/software/roborio-libraries/java/

  3. Click on this latest build link and download the installer. image

  4. Find where the downloaded folder is on your computer. Right click on it and select "Extract" or "Extract all"

  5. Once the files are extracted, you should see this: image

  6. Double-click setup.exe

  7. If Windows complains at you, click "Run anyway" image

  8. Click through the installer: Next/Start/etc. until the installation completes. You may have to allow the installer to install the Microsoft C++ 2013 Redistributable - this is necessary and you should allow it. Click "Finish" when the installer is done.

More to follow!

amorygalili commented 8 months ago

Swerve TODO for Saturday (1/20)

Check that:

While testing on Thursday Anna and I observed in the frc web components dashboard that the swerve module angles were mirrored on the y-Axis. This is likely due to enoder values increasing clockwise. This can be changed by adding absoluteEncoderInverted: true to the swerve module configurations: https://yagsl.gitbook.io/yagsl/configuring-yagsl/configuration/swerve-module-configuration#example-configuration

Other things to check for swerve code:

We need to update the YAGSL code to use the 2024 release. I think the best way to this would be to:

We should also create a separate working configuration for sim. The configuration here should work: https://github.com/BroncBotz3481/YAGSL-Example/tree/main/src/main/deploy/swerve/neo We should conditionally set which configuration we use based on our environment using the RobotBase.isSimulation() function.

amorygalili commented 8 months ago

We may need to update the encoder conversion factor using this formula:

Motor conversion factor is (PI * WHEEL DIAMETER IN METERS) / (GEAR RATIO * ENCODER RESOLUTION)

Wheel diameters = 3 in Gear ratio = 5.08 Encoder Resolution = 7168 or 1 if revlib already handles this for us