Quote:
Originally Posted by Bot190
As far as I can tell from your description, you are describing Arcade drive exactly. It takes an x and y axis, and outputs to 2 or 4 motors similar to tank drive.
In other word, full left on the joystick would make the right side go full forward, and left side go full backwards. Full right would make right go full backward, and left go full forwards. And so on.
|
Some drivers find the following a bit more intuitive to drive:
if(Yj<=0){L=-Yj+Xj; R=-Yj-Xj;}
else {L= -Yj-Xj; R=-Yj+Xj;}
max=abs(L); if(max<abs(R))max=abs(R);
if(max>1){L/=max; R/=max;}
send "L" to the left wheels and "R" to the right wheels