View Single Post
  #4   Spotlight this post!  
Unread 04-19-2015, 03: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: Getting Gyro Working w/ Mecanum Drive

Quote:
Originally Posted by WillNess View Post
Wait so I can just do
RobotMap.robotDrive.mecanumDrive_Cartesian(OI.joys tick0.getX(), OI.joystick0.getY(), OI.joystick0.getZ(), RobotMap.driveGyro.getAngle());
in my teleopPeriodic and it'll do corrections for me? So if I'm driving w/o rotating it'll auto correct for me?
What you described above will make the driver interface field-centric:
Quote:
Originally Posted by Ether View Post

If your goal is to use the gyro to provide a field-centric driver interface, that's already part of the Java WPILib:

Code:
* @param gyroAngle The current angle reading from the gyro.  Use this to implement field-oriented controls.

If you want the vehicle not to rotate when the driver rotate command is zero, you could do something like this:
Quote:
Originally Posted by Ether View Post

if your goal is to make the bot drive straight when the driver is commanding zero rotation, you could do something like this:

http://www.chiefdelphi.com/forums/at...4&d=1420598437

Reply With Quote