-
Hello! I'm the lead programmer for Team 8234, and we've been trying to get our swerve working with this library with no luck. We're using all NEO motors with attached throughbore encoders for the angle motors, and the Pigeon 2 IMU. Currently whenever an input is pressed, the angle motors rotate at full speed, despite the desired direction staying still in the swerve display of frc-web-components. Here is a video demonstrating the behavior: https://youtube.com/watch?v=H-WVocYqxzI Any help with this issue would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Sorry for the late response! Thank you for the excellent video it illustrated your problem perfectly! It seems like you could need to invert all of your angle motors and/or use the correct conversion factor, remember that if NEOs are used the encoder pulse per revolution is 1! |
Beta Was this translation helpful? Give feedback.
-
Apologies for not getting back about this sooner, our team ended up disassembling the test swerve chassis and building our final one, and we've been waiting on the belly pan. It turns out there were some wiring issues with the last chassis along with some code issues, and long story short we resolved the wheels spinning in place like that. Despite resolving that issue, we're currently having issues with the swerve drivetrain not moving consistently, it seems to move in random directions if I hold the joystick forward, and the wheels never seem to move to the correct location. Here are some videos of the issue and the repository for the test code: If you're able to help with this, I would greatly appreciate it, it's our first year using swerve and a lot of people on our team are worried that it won't work. |
Beta Was this translation helpful? Give feedback.
-
After more testing, we managed to get it to move, but only robot oriented worked, field oriented would change the forward direction if we rotated. After fixing a lot of issues, however, we determined that setting absolute offsets caused all the drive motors to stop moving. If the absolute offsets are zero, the drive motors work perfectly, but the angle motors don't turn to the correct spots and the drive motors fight against each other. Do you know what could be causing this behavior? I've asked other teams and they don't seem to know, but none of them have used this library. |
Beta Was this translation helpful? Give feedback.
Thank you so much! I followed your advice and our swerve chassis is working now. Our team greatly appreciates your help!