Hi, my team has some Andy Mark Swerve Drives (With the REV motors), and we’re having a little trouble with programming them. We’re ENTIRELY new to FIRST, and so are pretty unfamiliar with most things regarding swerve drives and how to program them. I personally work as a controls engineer, so I’m used to programming motors and drives, but without the ability to sit with the swerve drives for hours myself and play with them, this post is my attempt to try and shortcut some of the trial and error and get the drive system working quickly.
Enough preamble, here’s what we’re seeing:
- Our motors have integrated encoders in them
- We have all the spark max’s set up and are able to at last make the motors move via the robo rio, via an xbox controller
- When we press one of the joysticks to turn the wheels, the wheels move (very non-fluidly), but don’t move continuously if that makes sense. Like if I press the stick to the right, the wheels may turn a half rev to the right and then stop. And same with the left. And it’s not like all the wheels move in sync with one another. It’s like they’re technically moving, but to my eyes, it looks very erratic
- In the REV hardware client, I’m not able to see the real time values of any of the integrated encoders in the REV motors
- Via the robo rio, we’re able to print debug statements that do successfully read out the motors’ current positions, although I’m not sure if we’re reading the integrated encoders or the shaft-mounted encoders that sit between the two motors on the top of the drive assembly
- In the REV hardware client, I can smoothly drive a single motor at a time using the percentage controls
So all of this put together, it seems like we’re missing something regarding programming the drives. From what I’ve understood, there’s a software abstraction layer that will live between our control code and the motor drive code that requires us to think in terms of translations of the robot, rather than in terms of spinning individual motors. But that’s about all I know.
I apologize if this is woefully little info here–I’m a mentor for the team trying to wrap my head around the swerve drives so that I can try and pass it along! Any advice that people can lend would be much appreciated!