protected void initialize() {

    // Use standard mecanum drive
    drivebase.initMecanum(false);

    /*
     *  Enable drivebase rotational PID
     */
    // Set target angle
    m_pc.setSetpoint(m_target);

    // Throttle down the max allowed speed
    m_pc.setOutputRange(-0.5, 0.5);

    // Set tolerance around the target angle
    m_pc.setAbsoluteTolerance(5);

    // Reset and enable PID controller
    m_pc.reset();
    m_pc.enable();
  }
Beispiel #2
0
 // Called just before this Command runs the first time
 protected void initialize() {
   // Get everything in a safe starting state.
   Robot.drivetrain.reset();
   pid.reset();
   pid.enable();
 }
 public void stop() {
   turnController.reset();
   robotDrive.drive(0, 0);
 }