|
Re: Offseason Project: Holonomic Kiwi Drive Robot
Okay... bear with me here.
(I made an error in my previous post - the sticks return from -127 to 126, but that won't effect values)
If I divide my joystick values by 157 before throwing them into the equations, wouldn't the equations return a value between -1 and 1?
For example, my math suggests that if the joystick were at (0,157), the value returned would be W2 and W3 running towards each other at .866 speed. I would then multiply that value by 100 to get the motor speed. The 86.6 would then be looked at in the abs val as the max, and left alone, right?
This also suggests to me (I could be wrong) that in that configuration, the robot wouldn't be going to maximum speed it was capable of - Or at least, I would expect that to be with both motors spinning towards each other at 100%. Is there a way to correct for that, or am I just wrong?
And for rotation, that would make my formulas...
W1 = joyX1 + R
W2 = (- joyX1 / 2) + sqrt(3) joyY1 / 2 + R
W3 = (- joyX1 / 2) - sqrt(3) joyY1 /2 + R
where R is rotation, scaled down from the joystick by dividing by the maximum joystick reading?
And then, I'd have to check that none of the equations returned values greater than 100, and if so, make it 100? (100 after being scaled up, 1 before)
__________________
When all else fails, read the manual.
FRC 1713 K Island Gears 2009, 2010 (Not 2011 due to budget, hopefully 2012!) - Fingerlakes Regional
FTC 4356 The Zip Ties 2010-2011 Season - NNYRC (2010 9th seed).
|