DavidGitz
29-01-2010, 15:25
Hi, we are implementing a swerve drive this year and I was curious to see how other teams are dealing with the wheel rotation issues that ensue, such as only a certain rotation can be made before hitting a mechanical (e.g. wire) constraint, the difference between you want to rotate your wheels all the way through or just invert the wheel direction instead, that kind of thing.
Our initial implementation was probably the most common and simple method, just take the angle of the joystick and command the rotation to that angle, and also to put a deadband in the vertical axis so that if the driver moves the joystick forward and backward sharply the wheels won't have to rotate all the way through 180 degrees, just the wheel direction is inverted. (It should be noted that with our system, we are capable of rotating through around 400 degrees by design). The problem with this though is that if the driver were to move the joystick back and then to the left, the rotation would command would have sharp changes that, although wouldn't be mechanically a problem would require a finite amount of time to transition.
The next idea is to map out the transition zones on the joystick, determine which path would require a normal rotation or reverse rotation and reverse wheel direction. Attached is a chart describing these transition areas. A transition across the red arrow would result in a rotation inversion and wheel speed inversion, whereas a transition across the blue arrow would not. No code yet, it is still an idea.
But both these "solutions" still have to deal with working with the finite rotation available (since slip rings (http://forums.usfirst.org/showthread.php?t=14004)aren't so good anymore). I don't see how there could be a quick fix to this issue, since this constraint will exist no matter what. You could design this maximum rotation at an angle where a driver wouldn't necessarily be crossing often, so that you don't have the wheels rotating 360 degrees just to move a couple, which is what I'm planning on doing.
Our initial implementation was probably the most common and simple method, just take the angle of the joystick and command the rotation to that angle, and also to put a deadband in the vertical axis so that if the driver moves the joystick forward and backward sharply the wheels won't have to rotate all the way through 180 degrees, just the wheel direction is inverted. (It should be noted that with our system, we are capable of rotating through around 400 degrees by design). The problem with this though is that if the driver were to move the joystick back and then to the left, the rotation would command would have sharp changes that, although wouldn't be mechanically a problem would require a finite amount of time to transition.
The next idea is to map out the transition zones on the joystick, determine which path would require a normal rotation or reverse rotation and reverse wheel direction. Attached is a chart describing these transition areas. A transition across the red arrow would result in a rotation inversion and wheel speed inversion, whereas a transition across the blue arrow would not. No code yet, it is still an idea.
But both these "solutions" still have to deal with working with the finite rotation available (since slip rings (http://forums.usfirst.org/showthread.php?t=14004)aren't so good anymore). I don't see how there could be a quick fix to this issue, since this constraint will exist no matter what. You could design this maximum rotation at an angle where a driver wouldn't necessarily be crossing often, so that you don't have the wheels rotating 360 degrees just to move a couple, which is what I'm planning on doing.