View Single Post
  #8   Spotlight this post!  
Unread 23-02-2012, 19:36
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Tank or arcade drive?

Quote:
Originally Posted by touchdownjesus4 View Post
I was thinking about doing something like this, just have no idea how to program it. I'm programming in java and currently have it set up to do tank drive but wanted to try out this type of system. How does your team implement this?
You could use the following method
Code:
public void arcadeDrive(GenericHID moveStick, final int moveAxis, GenericHID rotateStick, final int rotateAxis, boolean squaredInputs)
Set moveStick and rotateStick to your controller and moveAxis to the y axis of the left stick and rotateAxis to the x axis of the right stick.

Quote:
Originally Posted by Ether View Post
left_wheels = (ForwardCommand + ClockwiseRotationCommand)/2

right_wheels = (ForwardCommand - ClockwiseRotationCommand)/2


ForwardCommand and ClockwiseRotationCommand are -1 to +1.


The disadvantage of this algorithm is that when Forward Command is 1 and ClockwiseRotationCommand is 0, you only move at half speed.

I've attached a quick comparison between Ether's algorithm, the arcade drive in WPILib (Java and C++, not sure if it's different in LabVIEW), and the algorithm that we use. (We drive with tank drive in telop, but find that "arcade" is easier to program for in autonomous)
Attached Files
File Type: xlsx Arcade_Comparison.xlsx (12.5 KB, 66 views)
Reply With Quote