|
Re: Single joystick control problem
After teaming with Eric S and scatching our heads a while, I think we've come up with the reason and a solution to the backward left isn't really backward left problem. It's a bit complicated, but it has to do with having the tread speed differential (Dt) being a function of both joystick x and y input. Currently, the Dt is x-127. If you use a Dt = (x-127)((y-127)/127), you get a solution where the robot will turn left when you ask it to.
However, and there always is a however, you lose the ability to spin on the axis of the robot. This is because the slope of the Dt vs x curve is zero when y equals 127.
I told you that it was a little complicated. Anyway, here's the equations:
Tread 1 = -x + ((x*y)/127) + 127
Tread 2 = 2y + x - ((x*y)/127) - 127
I will leave the exercise of determining right and left to the reader at this time. It was not relevant to the derivation, so I didn't worry about it yet.
I hope to write up a white paper on this over Thanksgiving weekend.
__________________
Warren B
Pool Noodles. They're not just for bumpers anymore.
|