# Turning with swerve

I’ve been looking into swerve and I’m not sure how you would rotate while moving with it. If your bot is moving diagonal to chassis how do you rotate. I was considering a turret but our team can’t build one with our resources.

Maybe one set of wheels turn faster than the other to cover more surface area as the other set slows down? The longer i thought, the more it confused me.

Exactly. I was thinking the outside move faster but then the traction wheels on inside slow you down

From a programming perspective all it requires is your add the turning and drive vectors with Pythagorean theorem/basic trig. It’s explained better in the PowerPoint linked below.

2 Likes

Yes. It is added together and normalized so no wheel gets inputs out of range. We had problems turning so the turning component didn’t add in. Also there is possibility to zero turn by moving all wheels tangential to the circle and driving. I assume you can add that and individual velocities to get even better turning.

Agreed, vector addition of translation and rotation components is the way to go.

1 Like

@Ether has some great whitepapers on swerve inverse kinematics

So rotation vector is just a 45 degree to corner for sqaure bot? That makes a lot more sense. What about crab drive? Where 4 wheels rotate together but drive seperately?

Yes to the 45 for a square robot. I am not too familiar with crap drive but my understanding is that you are much more limited in your ability to turn and spin at the same time.

With a traditional crab drive, it is impossible to turn. You can drive in any direction at a variable speed but you have no ability to rotate different wheels at different speeds or different directions in order to generate turning vectors.

In crab drive, my take was that turning ability drops significantly at 45s. As you move from 0 to 90 and vice versa, the wheels in line go through a zero point in the motor speed at 45 and fully invert by 90, if you want to avoid driving against each other. In the vice versa case it is the opposite wheel set. By inline I mean the wheels that are along the same plane when at 45 degrees. The others will be parrallel to each other and have some but largely reduced turning ability.

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