Log in

View Full Version : Swerve Drive Help


joliet cyborgs
11-02-2015, 13:35
Our team is trying to implement swerve drive for the first time and we are having problems with oscillation on our steer motors and the steer motors not getting to the setpoints properly. The setpoints seem to be calculating just fine however. We are using MA3 absolute analog encoders and CANTalon motor controllers for all 8 of our motors. Our encoders are coupled directly to the shafts of the steer motors.

Here is our code for reference. It is a stripped down and simplified version of team 16 BombSquad's code from last year:
https://github.com/JTHSConnelly/Cyborgs2015

joliet cyborgs
11-02-2015, 18:06
Nevermind! We fixed it. It was all the build team's fault. :P

ozrien
11-02-2015, 19:10
Can you explain what the root cause was, and how you figured it out? Might help another team.

Also I was curious...

Jefferson
11-02-2015, 19:54
I'll let them explain it, but, given their code base, I was happy to hear it wasn't code related. :D

joliet cyborgs
11-02-2015, 21:05
Thanks again Jefferson! So helpful! The leads to the steer motors were reversed. When we switched the leads or instead just put in a negative P value in our PID for the code, it worked. Not sure why it caused the motors to behave in the way they did. Someone more technically versed than I can probably explain it better.