Okay, our team is re-doing our swerve drive here in the off season. We decided to give YAGSL a go, and so far are having a good experience. We have gotten stumped as of recently on the rotation.
We use an Xbox One controller, and right now it can go the normal x and y directions just fine, but when we use the other joystick to start rotating, the robot will just infinitely rotate in that direction. If you change directions it will change, but it is still infinite. It’s like the joystick just toggles the direction.
Anybody got any ideas on where to look?
We are currently thinking it could be related to the deadband? Or possible PIDs? We aren’t exactly sure, hence the post…
Our code is here: GitHub - quackattack4181/neo-swerve-custom-yagsl
It’s a copy of the YAGSL Example for now. Just have been editing the JSON files for our robot specifically.
We are using the following:
Drive Motors: NEO’s
Angle Motors: NEO’s
Motor Controllers: ALL SparkMAX’s
Absolute Encoders: CANCoder’s
Gyro: NavX2 through the SPI Serial port on the roboRIO
Happy to answer questions. And any feedback / Insights would be greatly appreciated.
Thanks, Team 4181.
Wheel Modules: SDS MK4i’s