Quote:
Originally Posted by WizenedEE
Lots of teams made programs that would give their robot a lower acceleration, especially for Lunacy. Basically what you do is have a PID loop control the speed, and have the joystick as the setpoint.
|
A PID loop will do next to nothing to rate limit motor commands unless you tune it to be mushy as heck. A tightly tuned PID is going to be nearly as responsive as a straight joystick input. And you're going to want it tuned fairly tightly for mecanum unless you want your wheels to all come up to speed at different times. That'd give you some funny dynamics and wiggle when you changed directions.
Which brings me to my second point. If you're going to do this, and it's pretty easy to do, then rate limit your joystick signals before you put input them to the holonomic drive block. This will limit how fast you're changing directions, as opposed to how fast you're changing wheels speeds.
In case the distinction isn't obvious, think about what would happen if you made an instant change from full forward to full left strafe. Limiting the joystick means your direction vector would gradually swing from forward to left, and your bot would make a little controlled arc to the left. Limiting motor change would (I think) be somewhat different. Your front right and rear left wheels would stay at full forward, and your other wheels would shift to full reverse at the rate limited speed...
Thinking about this a bit more carefully, this might not actually change things since the mecanum kinematics are all linear. But I'm not able to work out the Jacobian of the kinematic equations and figure out what it means at the moment, so I don't know for sure....
On the gripping hand, rate limiting the joysticks in Labview is a lot easier to implement than limiting the motors anyways, so you should probably just stick with that.