So about swerve drive

What is the best controller setup for swerve drive? And is it more efficient for field orientated controls or robot orientated?

What is the optimal gear ratio for drive and steering? Would pulleys be better than chain and sprocket?

2 Likes

My team has never done swerve, but I’ve talked to quite a few teams who have. In short:

Most folks train on field-oriented b/c it enables some absurd controls. They also have backup practice in case a gyro fails. Most do single stick for translation relative to station, with another stick’s x axis for rotation, or one stick for translation, one for desired heading.

Optimal gear ratio for drive and steering is entirely dependent on the motors, reduction, etc. Pullies or direct gear engagement are essentially the go-to for most “modern” swerve though. Studying the ratios of 1640 on their ‘Swerve Central’ page, looking at the 2910 modules, the AM Swerve & Steer should get you an idea of what to go for.

Please though, do as much additional research as you can. Swerve is hard.

4 Likes

For swerve we typically use an Xbox controller with the left joystick controlling the translation of the robot and the X axis of the right joystick controlling the rotation. One of the bumpers on the controller toggles field vs. robot orient so we can smoothly transition between the two depending on in-game scenarios and/or gyro failures. As @krf said the ratios are dependent on your module setup, motor types, etc.

1 Like

We did exactly this. Right stick for rotation, left stick for translation. Hold right bumper for robot oriented. We ran a gear ratio of 8.5:1 on drive (Neo motors) and 63:1 on rotation (bag motors) (we used the 2910/SwerveDriveSpecialties mk1 modules)

I think field oriented is superior to robot in most scenarios, though there are some where you might prefer robot oriented eg pulling straight out after placing a hatch, driving via camera, etc. That’s why we made it easy for the driver to swap modes.

4 Likes

From a month ago:

1 Like

Just to add a few things to what has already been said…

Each of our drivers over the past 4 years has had a different approach regarding when to use field orient vs robot orient. The most obvious place to use robot orient is when you are driving using a video camera feed such as the sandstorm period this year, or to pick up game elements on the far end of the field in previous years (gears and cubes) when you could really not see what you were doing from the driver station. But each driver has had their own preference. Giving them the ability to toggle between the two modes is a definite plus.

Regarding the optimal gearing for drive, that will vary from year to year. Cycle time is often optimized when you gear for acceleration versus top speed. But the NEO motor has really been a game changer in that regard as the acceleration is a lot better with the NEO motors than it was with miniCIMs, so we are rethinking our gear ratios to go with a bit higher speed. Top speed is limited by braking and tipping over which can vary with the robot configuration (top heavy versus low to the ground). Really the considerations are similar to the gearing that you might use for other drivetrains. The major difference is that you may want to think about whether you want to gear for defensive pushing battles. This season notwithstanding, if you are in a pushing match with swerve, then you are probably not taking advantage of the strengths of swerve.

Gearing for steering also depends a bit on your motor choice. The module rotation theoretical free speed around 150 - 200 rpm seems to be where a lot of people geared their modules in the past. I think with NEOs for steering, that the speed could be a little higher. The trick is getting the speed slow enough to develop a stable PID given the backlash in your geartrain and other factors. Also, remember that your drive motor is going to impart a torque into the module that tries to make it spin and the steering motor will resist that by imparting a stall torque. If the gear ratio is too low, then the motor stall torque may be high enough to burn out your motor. Generally, we have hit the stability limit before we have hit the stall torque limit, but some of that depends on the drive gearing that you choose.

Generally, you will want to have a good handle on all these factors if you adjust the steering speed and drive speed away from a known good setting. If you are developing a swerve design from scratch you may want to start with higher ratios for both drive and steering and then adjust your ratios as you get comfortable with the design. Our design uses VP gearsets so changing the gear ratios is pretty easy.

On 3419, our control scheme differs a bit from year to year depending on the driver and the game, but generally it’s an Xbox controller, with translation direction on the left joystick, linear speed on the right trigger, and rotational speed on the right thumb stick. The other buttons support game-specific functions. This year we had the thumpad do “nudging” - I.e., moving slowly in a cardinal direction. We also had the four colored buttons automatically turn the front of the robot to that direction.

What others said about module rotation speed is spot on. You need it to be slow enough to be controllable in software, which should then provide plenty of torque no matter what motor you are using. We like to be in the 75-150 RPM range.

Driving speed is really dependent on the game. You don’t have the torque requirements that you might have with something like a west coast drive where you need to slide the wheels while turning. However, you probably only have 4 drive motors. We’ve been geared anywhere from 9 FPS (this year) to 17FPS (steamworks)

We did this:

9 Likes

image

1 Like

It was a pretty fun year. @icecube45 wrote a MIDI to “joystick” converter so we could control azimuth with the turntable, then we did field-centric translation with the joystick.

In hindsight it was actually a really great control scheme. I would have geared the swerve differently, but we know a LOT more about it now.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.