Quote:
Originally Posted by WillNess
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
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
|