So my team is looking to develop a swerve drive for next season (we’ve always done tank or mecanum) but we’ve been told by some teams that it has taken at least two to three years to program it. Is this true or do you think it can be done in one season.? We are thinking of using these modules. Also does anyone know of any good resources to help us program them since our programmer isn’t very experienced yet? We are close with a team that is also willing to help us develop it as well and use their practice field so they could help us as well.
I think it took about 1.5 weeks for me to program our swerve drive, .5 getting ready before the robot was done, 1 testing with the robot.
You can find my code Here
Ether’s Swerve resources are also helpful Here
Many teams say it takes “two to three years” to develop because the resources to execute it such that it’s not a major detriment to your competitive ability can and will take time to incubate. The swerve and steer is okay, though I’d personally go for the 2910 MK2 module in the present era of swerve development. The biggest thing for executing swerve properly is spending the time to get the controls right, and getting as much driver practice as possible, both before and after season start.
In this day and age, you are not starting from zero. There are a lot of good resources out there to use as a starting point. 2910 did their swerve as an offseason project and went to Einstein with it the next year. Their module is a great place to start. You can also look for our module (search CD for Strange Swerve). Our code is also published somewhere that you could use as a starting point.
We helped 2 teams do swerve this year. Against our advice, they decided to start after kickoff rather than as an offseason project. They used our module design and we helped them with their code (I think they used our code as a starting point). One of the teams had a very successful season and were an alliance captain at our district championships. They had very few issues with their swerve. They are just down the road, so they had our team as a resource, but they really didn’t need that much help once we got them pointed in the right direction.
If you are trying to develop your own swerve modules, it will take a few years to get all the kinks worked out. But if you are starting with an existing design, you should be able to do it in the off season and be ready to use it at kickoff. Same is true of the code.
If you need help getting started with module design or coding, send me a PM and I will put you in touch with our students who can help you out.
Getting started and building a swerve could only take a summer, especially if you’re getting inspiration from existing models. Optimizing and improving takes a lot longer.
We started 7 years and we’re not done yet; there’s a lot more to do, both in the mechanical and software realms. Not yet updated for the 2019 season, Mechanical_Design_Description_of_Stryke_Force_Swerve_Drive_Units.pdf (777.2 KB) explains our experience with swerve and our design.
As @orangelight mentioned, Ether’s resources lay out the math really clearly and are incredibly useful:
Our software can be found at www.github.com/strykeforce/thirdcoast. There are new improvements and little optimizations that are made every year.
Be wary of the future time and resource commitment. Swerves tend to be more sensitive to damage/imperfections and require more time and resources for routine maintenance than other drivetrains. In practical application, swerves bring a lot of new worries for programmers like gyro alignment and wheel alignment which can be especially problematic in developing autons. Ultimately, there’s a lot of potential.
We’ve been using those modules but the encoders they recommend using suck. Here’s a thread about them How to measure angles larger than 360 degrees by MA3 encoder?
I think as long as you’re comfortable with the language you use and have decent programming experience you can do it.
Just so you know, Triple Strange are the gods of swerve drive in NC. What they do with it is very impressive, so taking wgorgen’s advice on this is pretty much a sure bet.
If you dedicate a good amount of time to it swerve definitely can be done in an offseason, but it is a serious time commitment.
With regard to the swerve and steer modules, they are good if you just want modules to program with as long as you get the absolute encoder, but from what I have heard they are not reliable enough to run during the competition season without some modifications. You would probably get better results with 2910 or WCP swerve, but they cost 500 a module so they are noticeably more expensive.
Another idea would be to ask a team near you that does swerve to borrow two of their old modules. You could use them both as a basis for your design and to program with. For programming you only really need two modules, just put them in opposite corners and non powered mechanums in the other 2.
We started with the Andymark swerve and steer modules in 2017 and have used them for the last 3 years in competition. They do have weak points that you have to be aware of, but they get you in the swerve game for a relatively low cost. We programmed our initial 2017 robot in under 2 weeks, and practiced driving for over 3 weeks that year while improving the code. There are better modules out there at this point but they are higher in initial cost. As others have mentioned get the white papers that Ether published. They will explain the math that is used for swerves.
@Ryan-1701 PM me. We can get you started and get you onto the practice field.
3707 seems to be having a good time with the swerve and steer modules. If what I’ve read is correct…they’ve been using them for 2 seasons now with pretty solid success. 2x Einstein appearances and a win.
This year we purchased 4 2910 Modules at the onset of build season. Overall, we only had a module fail a single time, and only due to another robot tearing off one of the bag steering motors while playing rough defense.
The overall experience we had with these mechanically was stellar, however programmatically it was mediocre. Mechanically we never had any parts of the module fail under even rough operating conditions. We had two of the 4-inch versawheels have their plastic hubs shatter due to running into the Cargo Depot bars at max speed, however, we did not even notice this occur until several matches later. Swapping wheels was only about a 5-minute project per wheel, even when there was not a premade spare ready (And importantly, did not require a rez-ero of the modules).
This module uses an absolute potentiometer to measure the rotation of the wheel, and most examples for code utilize encoders or the like. This meant that much of our code had to be written from scratch (we use LabView, so not many examples to begin with). The bright side of the absolute encoder is that the module only needs to be zeroed a single time when it is first attached to the robot, meaning that over the course of the season we only ever had to re-zero the module when it was replaced.
It ended up taking me around 2 weeks to have working code for the test chassis we created (extremely easy as this module makes up the corner of a 2x1 frame and acts as a support structure), however, even at the end of the season we were not controlling the robot to its maximum extent due to limited time and experience with the system.
Swerve also let us do some cool programming things, and I am sure they will be useful to act as a testbed in the future or when the game calls for it again.
Overall I am glad that we went with swerve this season, however, I wish that we had developed it prior to the start of the season.
Yes they have but from what I have heard they are somewhat of an exception. You can definitely get the swerve and steer to work well, but they are not a complete plug and play system.
2910s modules are far better, swerve and steer is near obsolete
I agree, the only issue is cost. In order for 2910s to be fully functional they cost almost $500 without motor controllers.