View Single Post
  #5   Spotlight this post!  
Unread 01-28-2011, 08:52 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,998
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Single Joystick Tank Drive

Quote:
Originally Posted by Shantali View Post
Hi all,

I'm programming for rookie team. I barely have any experience with Java or robotics for that matter.

My goal is to make the robot drive with a single joystick in differential "tank" drive.
Here's the schematic that I found that would be ideal...
http://web.goodrobot.com/blog/wp-con.../tankdrive.png

I'm using Iterative robot template.

Any help would be greatttly appreciated!

J

Try this:

// Xj,Yj are the joystick readings

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




Last edited by Ether : 01-28-2011 at 09:28 PM. Reason: allow full power
Reply With Quote