View Single Post
  #4   Spotlight this post!  
Unread 04-03-2013, 23:31
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
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: Making a 2 axis controller turn the robot

Quote:
Originally Posted by sunny1118 View Post
We are using mecanum, we have one of our joystick for drive and the other is auxil. We want the auxil to just rotate the robot and are not sure which arcade drive to use
If you want independent control of mecanum FWD/REV, strafe Left/Right, and rotate (turn) CW/CCW, then you need three inputs.

Arcade drive is for skid steer and does not take 3 inputs.

A 2-axis joystick does not produce 3 outputs (unless you want to use the throttle for the 3rd output).

The mecanumDrive_Cartesian() method in the RobotDrive.java file in WPILib takes three inputs.

You need a DI (Driver Interface) that gives the driver three controls: one each for fwd/rev, strafe left/right, and rotate CW/CCW.

So your DI could be this:

Y axis of Joystick1 is FWD/REV

X axis of Joystick1 is Strafe Right/Left

X axis of Joystick2 is Rotate CW/CCW.

... and just feed those three outputs into the appropriate 3 inputs of the mecanumDrive_Cartesian() method.




Last edited by Ether : 05-03-2013 at 00:45.
Reply With Quote