Skip to content

TheHolyCows/1538_2025

Repository files navigation

1538_2025

CAN IDs

ID Device
1 Swerve FL Drive
2 Swerve FL Rotation
3 Swerve FR Drive
4 Swerve FR Rotation
5 Swerve BL Drive
6 Swerve BL Rotation
7 Swerve BR Drive
8 Swerve BR Rotation
9 Swerve FL Encoder
10 Swerve FR Encoder
11 Swerve BL Encoder
12 Swerve BR Encoder
15 Pivot motor
16 Pivot encoder
17 Wrist motor
18 Telescope motor
20 Claw motor
30 Claw CANRange
40 PCM
0 Claw solenoid
24 Pigeon

Calibration

Swerve Drive

  1. Physcially rotate the swerve modules to their zeroing position.
  2. In Phoenix Tuner, click the zero button for each encoder and note the value that appears on screen. image
  3. Convert the Phoenix Tuner encoder offset value from turns to degrees and add any necessary offsets, such as removing the 45 deg offset.
  4. Record these values in CowRobot.cpp for each module.
    SwerveModule::Config { 1, 2, 9, -58.32_deg },
    SwerveModule::Config { 3, 4, 10, -165.24_deg },
    SwerveModule::Config { 5, 6, 11, 85.32_deg },
    SwerveModule::Config { 7, 8, 12, 82.08_deg }
  5. Load the new build onto the robot.
  6. Validation
    1. Enable the robot in teleoperated mode. The modules should all point forward without joystick input.
    2. Check the translation joystick. Make sure the driver station alliance is set to blue.

      The starting pose for the robot is at the blue alliance wall facing toward the red alliance wall, so moving forward on the joystick should move the robot away from the driver. image

Troubleshooting

  • If you suspect that the drive motors or rotation motors are inverted, enable it manually in Phoenix Tuner and move each motor with a positive duty cycle control.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors