本文整理汇总了Java中edu.wpi.first.wpilibj.RobotDrive.setSensitivity方法的典型用法代码示例。如果您正苦于以下问题:Java RobotDrive.setSensitivity方法的具体用法?Java RobotDrive.setSensitivity怎么用?Java RobotDrive.setSensitivity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.wpi.first.wpilibj.RobotDrive
的用法示例。
在下文中一共展示了RobotDrive.setSensitivity方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
compressor = new Compressor();
driveTrainLeftFront = new CANTalon(1);
LiveWindow.addActuator("DriveTrain", "LeftFront", driveTrainLeftFront);
driveTrainRightFront = new CANTalon(3);
LiveWindow.addActuator("DriveTrain", "RightFront", driveTrainRightFront);
driveTrainLeftRear = new CANTalon(2);
driveTrainLeftRear.changeControlMode(TalonControlMode.Follower);
driveTrainLeftRear.set(driveTrainLeftFront.getDeviceID());
LiveWindow.addActuator("DriveTrain", "LeftRear", driveTrainLeftRear);
driveTrainRightRear = new CANTalon(4);
driveTrainRightRear.changeControlMode(TalonControlMode.Follower);
driveTrainRightRear.set(driveTrainRightFront.getDeviceID());
driveTrainRightRear.reverseOutput(false);
LiveWindow.addActuator("DriveTrain", "RightRear", driveTrainRightRear);
driveTrainLeftFront.setInverted(true);
driveTrainRightFront.setInverted(true);
driveTrainLeftRear.setInverted(true);
driveTrainRightRear.setInverted(true);
driveTrainRobotDrive41 = new RobotDrive(driveTrainRightFront, driveTrainLeftFront);
driveTrainRobotDrive41.setSafetyEnabled(true);
driveTrainRobotDrive41.setExpiration(0.1);
driveTrainRobotDrive41.setSensitivity(0.5);
driveTrainRobotDrive41.setMaxOutput(1.0);
climbMotor = new CANTalon(5);
LiveWindow.addActuator("Climbing", "Motor", climbMotor);
lightsLightEnable = new Relay(0);
LiveWindow.addActuator("Lights", "LightEnable", lightsLightEnable);
gearIntakeRamp = new DoubleSolenoid(1, 0);
LiveWindow.addActuator("GearIntake", "IntakeRamp", gearIntakeRamp);
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
示例2: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
driveTrainLeftFront = new Victor(0);
LiveWindow.addActuator("DriveTrain", "LeftFront", (Victor) driveTrainLeftFront);
driveTrainLeftRear = new Victor(1);
LiveWindow.addActuator("DriveTrain", "LeftRear", (Victor) driveTrainLeftRear);
driveTrainRightFront = new Victor(2);
LiveWindow.addActuator("DriveTrain", "RightFront", (Victor) driveTrainRightFront);
driveTrainRightRear = new Victor(3);
LiveWindow.addActuator("DriveTrain", "RightRear", (Victor) driveTrainRightRear);
driveTrainRobotDrive = new RobotDrive(driveTrainLeftFront, driveTrainLeftRear,
driveTrainRightFront, driveTrainRightRear);
driveTrainRobotDrive.setSafetyEnabled(false);
driveTrainRobotDrive.setExpiration(0.1);
driveTrainRobotDrive.setSensitivity(1.0);
driveTrainRobotDrive.setMaxOutput(1.0);
shootershooterTalon = new CANTalon(0);
LiveWindow.addActuator("Shooter", "shooterTalon", shootershooterTalon);
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
// set this up
gyro = new ADXRS450_Gyro();
}
示例3: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
motorRelayMotorRelay1 = new Relay(0);
LiveWindow.addActuator("MotorRelay", "MotorRelay1", motorRelayMotorRelay1);
lFront = new CANTalon(1);
LiveWindow.addActuator("Wheels", "Speed Controller 1", (CANTalon) lFront);
rFront = new CANTalon(3);
LiveWindow.addActuator("Wheels", "Speed Controller 2", (CANTalon) rFront);
lRear = new CANTalon(2);
LiveWindow.addActuator("Wheels", "Speed Controller 3", (CANTalon) lRear);
rRear = new CANTalon(4);
LiveWindow.addActuator("Wheels", "Speed Controller 4", (CANTalon) rRear);
driveSystem = new RobotDrive(lFront, lRear,
rFront, rRear);
driveSystem.setSafetyEnabled(true);
driveSystem.setExpiration(0.1);
driveSystem.setSensitivity(0.5);
driveSystem.setMaxOutput(1.0);
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
示例4: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
driveTrainLeftMotor = new Talon(0);
LiveWindow.addActuator("DriveTrain", "LeftMotor", (Talon) driveTrainLeftMotor);
driveTrainRightMotor = new Talon(1);
LiveWindow.addActuator("DriveTrain", "RightMotor", (Talon) driveTrainRightMotor);
driveTrainRobotDrive = new RobotDrive(driveTrainLeftMotor, driveTrainRightMotor);
driveTrainRobotDrive.setSafetyEnabled(true);
driveTrainRobotDrive.setExpiration(0.1);
driveTrainRobotDrive.setSensitivity(0.5);
driveTrainRobotDrive.setMaxOutput(1.0);
intakeintakeMotor = new Talon(2);
LiveWindow.addActuator("Intake", "intakeMotor", (Talon) intakeintakeMotor);
pneumaticSystemCompressor = new Compressor(0);
pneumaticSystemDoubleSolenoidPusher = new DoubleSolenoid(0, 0, 1);
LiveWindow.addActuator("Pneumatic System", "DoubleSolenoidPusher", pneumaticSystemDoubleSolenoidPusher);
sensorBaseUltraSonicMaxbotix = new AnalogInput(0);
LiveWindow.addSensor("SensorBase", "UltraSonicMaxbotix", sensorBaseUltraSonicMaxbotix);
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
示例5: robotInit
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public void robotInit() {
frontLeft = new VictorSP(0);
backLeft = new VictorSP(1);
frontRight = new VictorSP(2);
backRight = new VictorSP(3);
intakeMotor = new VictorSP(4);
compressor = new Compressor(0);
intakeSolenoid = new Solenoid(0);
driveTrain = new RobotDrive(frontLeft, backLeft, frontRight, backRight);
driveTrain.setSafetyEnabled(false);
driveTrain.setExpiration(0.1);
driveTrain.setSensitivity(0.5);
driveTrain.setInvertedMotor(RobotDrive.MotorType.kFrontLeft, false);
driveTrain.setInvertedMotor(RobotDrive.MotorType.kRearLeft, false);
driveTrain.setInvertedMotor(RobotDrive.MotorType.kFrontRight, false);
driveTrain.setInvertedMotor(RobotDrive.MotorType.kRearRight, false);
XboxController = new Joystick(2);
rightJoystick = new Joystick(1);
leftJoystick = new Joystick(0);
}
示例6: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init() {
leftDriveMotor = new Talon(leftDriveMotorPin);
LiveWindow.addActuator("driveTrain", "Left Motor",
(Talon) leftDriveMotor);
rightDriveMotor = new Talon(rightDriveMotorPin);
LiveWindow.addActuator("driveTrain", "Right Motor",
(Talon) rightDriveMotor);
shifterSolenoid = new DoubleSolenoid(shifterSolenoidUpPin, shifterSolenoidDownPin);
LiveWindow.addActuator("driveTrain", "Gearbox Shifter",
(DoubleSolenoid) shifterSolenoid);
winchMotor = new Talon(winchMotorPin);
LiveWindow.addActuator("chainLifter", "Elevator Motor",
(Talon) winchMotor);
robotDrive = new RobotDrive(leftDriveMotor, rightDriveMotor);
robotDrive.setSafetyEnabled(true);
robotDrive.setExpiration(0.1);
robotDrive.setSensitivity(0.5);
robotDrive.setMaxOutput(1.0);
robotDrive.setInvertedMotor(RobotDrive.MotorType.kRearLeft, false);
robotDrive.setInvertedMotor(RobotDrive.MotorType.kRearRight, false);
grabberSolenoid = new DoubleSolenoid(grabberSolenoidOpenPin, grabberSolenoidClosePin);
LiveWindow.addActuator("grabberArm", "Grabber Solenoid",
(DoubleSolenoid) grabberSolenoid);
compressor = new Compressor();
LiveWindow.addActuator("grabberArm", "compressor",
(Compressor) compressor);
}
示例7: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init()
{
driveTrainRightVictor = new Victor(1, 1);
driveTrainLeftVictor = new Victor(1, 3);
loaderVictor = new Victor(1, 2);
CatapultVictor = new Victor(1, 4);
FireSolenoidSpike = new Relay(2);
PrimeSolenoidSpike = new Relay(3);
lightSpike = new Relay(7);
compressorSpike = new Relay(8);
gyro = new Gyro(1);
ultrasonic = new AnalogChannel(3);
limitSwitch = new DigitalInput(3);
pressureSwitch = new DigitalInput(2);
LiveWindow.addActuator("Drive Train", "Right Victor", (Victor) driveTrainRightVictor);
LiveWindow.addActuator("Drive Train", "Left Victor", (Victor) driveTrainLeftVictor);
robotDriveTrain = new RobotDrive(driveTrainLeftVictor, driveTrainRightVictor);
robotDriveTrain.setSafetyEnabled(true);
robotDriveTrain.setExpiration(0.1);
robotDriveTrain.setSensitivity(0.5);
robotDriveTrain.setMaxOutput(1.0);
}
示例8: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
driveleftDrive = new CANTalon(3);
LiveWindow.addActuator("Drive", "leftDrive", driveleftDrive);
driverightDrive = new CANTalon(4);
LiveWindow.addActuator("Drive", "rightDrive", driverightDrive);
driveRobotDrive21 = new RobotDrive(driveleftDrive, driverightDrive);
driveRobotDrive21.setSafetyEnabled(true);
driveRobotDrive21.setExpiration(0.1);
driveRobotDrive21.setSensitivity(0.5);
driveRobotDrive21.setMaxOutput(1.0);
armsingleArm = new CANTalon(9);
armsingleArm.changeControlMode(TalonControlMode.PercentVbus);
armsingleArm.setFeedbackDevice(FeedbackDevice.QuadEncoder);
/*
armsingleArm.setPID(.7, 0.000001, 0);
//armsingleArm.setPosition(0);
armsingleArm.set(RobotMap.armsingleArm.get());
*/
LiveWindow.addActuator("Arm", "singleArm", armsingleArm);
LiveWindow.addSensor("Arm", "singleArm", armsingleArm);
intakeMotor = new CANTalon(8);
//LiveWindow.addActuator("Intake", "intakeMotor", intakeMotor);
shooterrightShooter = new CANTalon(6);
//LiveWindow.addActuator("Shooter", "rightShooter", shooterrightShooter);
shooterleftShooter = new CANTalon(7);
//LiveWindow.addActuator("Shooter", "leftShooter", shooterleftShooter);
shootershootPlunger = new CANTalon(11);
//LiveWindow.addActuator("Shooter", "shootPlunger", shootershootPlunger);
aimscissorLift = new CANTalon(10);
//LiveWindow.addActuator("Aim", "scissorLift", aimscissorLift);
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
示例9: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
driveTrainleftFrontTalon0 = new TalonSRX(0);
LiveWindow.addActuator("DriveTrain", "leftFrontTalon0", (TalonSRX) driveTrainleftFrontTalon0);
driveTrainleftBackTalon1 = new TalonSRX(1);
LiveWindow.addActuator("DriveTrain", "leftBackTalon1", (TalonSRX) driveTrainleftBackTalon1);
driveTrainrightFrontTalon2 = new TalonSRX(2);
LiveWindow.addActuator("DriveTrain", "rightFrontTalon2", (TalonSRX) driveTrainrightFrontTalon2);
driveTrainrightBackTalon3 = new TalonSRX(3);
LiveWindow.addActuator("DriveTrain", "rightBackTalon3", (TalonSRX) driveTrainrightBackTalon3);
driveTrainRobotDrive = new RobotDrive(driveTrainleftFrontTalon0, driveTrainleftBackTalon1,
driveTrainrightFrontTalon2, driveTrainrightBackTalon3);
driveTrainRobotDrive.setSafetyEnabled(true);
driveTrainRobotDrive.setExpiration(0.1);
driveTrainRobotDrive.setSensitivity(0.5);
driveTrainRobotDrive.setMaxOutput(1.0);
driveTraingyro = new Gyro(0);
LiveWindow.addSensor("DriveTrain", "gyro", driveTraingyro);
driveTraingyro.setSensitivity(0.007);
driveTrainleftFrontEncoder = new Encoder(17, 18, false, EncodingType.k4X);
LiveWindow.addSensor("DriveTrain", "leftFrontEncoder", driveTrainleftFrontEncoder);
driveTrainleftFrontEncoder.setDistancePerPulse(1.0);
driveTrainleftFrontEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
driveTrainleftBackEncoder = new Encoder(19, 20, false, EncodingType.k4X);
LiveWindow.addSensor("DriveTrain", "leftBackEncoder", driveTrainleftBackEncoder);
driveTrainleftBackEncoder.setDistancePerPulse(1.0);
driveTrainleftBackEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
driveTrainrightFrontEncoder = new Encoder(21, 22, false, EncodingType.k4X);
LiveWindow.addSensor("DriveTrain", "rightFrontEncoder", driveTrainrightFrontEncoder);
driveTrainrightFrontEncoder.setDistancePerPulse(1.0);
driveTrainrightFrontEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
driveTrainrightBackEncoder = new Encoder(23, 24, false, EncodingType.k4X);
LiveWindow.addSensor("DriveTrain", "rightBackEncoder", driveTrainrightBackEncoder);
driveTrainrightBackEncoder.setDistancePerPulse(1.0);
driveTrainrightBackEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
示例10: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init() {
visionFrontSonar = new AnalogChannel(2);
visionFrontSonarSolenoidRelay = new Solenoid(3);
ColorLedsRelay = new Relay(3);
FlashingLedsRelay = new Relay(2);
m_compressor = new Compressor(7, 1);
canonAngleAllWheelAngleMotor = new Talon(1, 4);
LiveWindow.addActuator("CanonAngle", "AllWheelAngleMotor", (Talon) canonAngleAllWheelAngleMotor);
canonAngleAnglePot = new AnalogChannel(1, 4);
LiveWindow.addSensor("CanonAngle", "AnglePot", canonAngleAnglePot);
canonAngleUpperAngleLimitSwitch = new DigitalInput(1, 1);
LiveWindow.addSensor("CanonAngle", "UpperAngleLimitSwitch", canonAngleUpperAngleLimitSwitch);
canonAngleLowerAngleLimitSwitch = new DigitalInput(1, 2);
LiveWindow.addSensor("CanonAngle", "LowerAngleLimitSwitch", canonAngleLowerAngleLimitSwitch);
canonSpinnerAllWheelSpinnerMotor = new Talon(1, 3);
LiveWindow.addActuator("CanonSpinner", "AllWheelSpinnerMotor", (Talon) canonSpinnerAllWheelSpinnerMotor);
canonShooterShooterSolenoid = new DoubleSolenoid(1, 1, 2);
LiveWindow.addActuator("CanonShooter", "ShooterSolenoid", canonShooterShooterSolenoid);
canonShooterShooterSolenoid.set(DoubleSolenoid.Value.kReverse);
driveTrainAllWheelRightMotor = new Talon(1, 2);
LiveWindow.addActuator("DriveTrain", "AllWheelRightMotor", (Talon) driveTrainAllWheelRightMotor);
driveTrainAllWheelLeftMotor = new Talon(1, 1);
LiveWindow.addActuator("DriveTrain", "AllWheelLeftMotor", (Talon) driveTrainAllWheelLeftMotor);
driveTrainAllWheelRobotDrive = new RobotDrive(driveTrainAllWheelLeftMotor, driveTrainAllWheelRightMotor);
driveTrainAllWheelRobotDrive.setSafetyEnabled(true);
driveTrainAllWheelRobotDrive.setExpiration(0.1);
driveTrainAllWheelRobotDrive.setSensitivity(0.5);
driveTrainAllWheelRobotDrive.setMaxOutput(1.0);
driveTrainAllWheelRobotDrive.setInvertedMotor(RobotDrive.MotorType.kRearLeft, false);
driveTrainAllWheelRobotDrive.setInvertedMotor(RobotDrive.MotorType.kRearRight, false);
driveTrainRobotFrameGyro = new Gyro(1, 1);
LiveWindow.addSensor("DriveTrain", "RobotFrameGyro", driveTrainRobotFrameGyro);
driveTrainRobotFrameGyro.setSensitivity(0.007);
}
示例11: init
import edu.wpi.first.wpilibj.RobotDrive; //导入方法依赖的package包/类
public static void init() {
driveTrainPWM0 = new TalonSRX(0);
LiveWindow.addActuator("DriveTrain", "PWM0", (TalonSRX) driveTrainPWM0);
driveTrainPWM9 = new TalonSRX(9);
LiveWindow.addActuator("DriveTrain", "PWM9", (TalonSRX) driveTrainPWM9);
driveTrainRobotDrive = new RobotDrive(driveTrainPWM0, driveTrainPWM9);
driveTrainRobotDrive.setSafetyEnabled(true);
driveTrainRobotDrive.setExpiration(0.1);
driveTrainRobotDrive.setSensitivity(0.5);
driveTrainRobotDrive.setMaxOutput(1.0);
intakePWM4 = new TalonSRX(4);
LiveWindow.addActuator("Intake", "PWM4", (TalonSRX) intakePWM4);
intakePWM5 = new TalonSRX(5);
LiveWindow.addActuator("Intake", "PWM5", (TalonSRX) intakePWM5);
elevatorPWM3 = new TalonSRX(3);
LiveWindow.addActuator("Elevator", "PWM3", (TalonSRX) elevatorPWM3);
elevatorPWM6 = new TalonSRX(6);
LiveWindow.addActuator("Elevator", "PWM6", (TalonSRX) elevatorPWM6);
armPWM2 = new TalonSRX(2);
LiveWindow.addActuator("Arm", "PWM2", (TalonSRX) armPWM2);
}