View Single Post
  #13   Spotlight this post!  
Unread 24-11-2011, 22:52
Djur's Avatar
Djur Djur is offline
WPILib
AKA: Sam Carlberg
no team
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Massachusetts
Posts: 182
Djur will become famous soon enough
Re: help with mecanum drive code

Quote:
Originally Posted by Ether View Post
The code you posted commands only translation (fwd/rev & left/right), no rotation.

The topic of this thread is "help with mecanum drive code", so yes turning is part of mecanum drive code.

Ah. Then I should just add that by setting FL, RL, FR, RR to the same value will make the robot turn. Positive values turn the robot counterclockwise, negative values turn it clockwise (assuming the motors are hooked up correctly).

Very simple example use for turning:
Code:
boolean turnRightAtFullSpeed = true;
if(turnRightAtFullSpeed)
jaguarDrive(-1, -1, -1, -1);
__________________
WPILib dev (RobotBuilder, SmartDashboard, GRIP)

Last edited by Djur : 24-11-2011 at 23:16.
Reply With Quote