2026-02-20 18:30:35 -05:00
|
|
|
#
|
|
|
|
|
# Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
# Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
# the WPILib BSD license file in the root directory of this project.
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# The constants module is a convenience place for teams to hold robot-wide
|
|
|
|
|
# numerical or boolean constants. Don't use this for any other purpose!
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
import math
|
|
|
|
|
import wpilib
|
|
|
|
|
|
|
|
|
|
# Motors
|
|
|
|
|
kLeftMotor1Port = 0
|
|
|
|
|
kLeftMotor2Port = 1
|
|
|
|
|
kRightMotor1Port = 2
|
|
|
|
|
kRightMotor2Port = 3
|
|
|
|
|
|
|
|
|
|
# Encoders
|
|
|
|
|
kLeftEncoderPorts = (0, 1)
|
|
|
|
|
kRightEncoderPorts = (2, 3)
|
|
|
|
|
kLeftEncoderReversed = False
|
|
|
|
|
kRightEncoderReversed = True
|
|
|
|
|
|
|
|
|
|
kEncoderCPR = 1024
|
|
|
|
|
kWheelDiameterInches = 6
|
|
|
|
|
# Assumes the encoders are directly mounted on the wheel shafts
|
|
|
|
|
kEncoderDistancePerPulse = (kWheelDiameterInches * math.pi) / kEncoderCPR
|
|
|
|
|
|
|
|
|
|
# Hatch
|
2026-03-19 21:32:48 -07:00
|
|
|
kHatchSolenoidModuleType = wpilib.PneumaticsModuleType.CTRE_PCM
|
2026-02-20 18:30:35 -05:00
|
|
|
kHatchSolenoidModule = 0
|
|
|
|
|
kHatchSolenoidPorts = (0, 1)
|
|
|
|
|
|
|
|
|
|
# Autonomous
|
|
|
|
|
kAutoDriveDistanceInches = 60
|
|
|
|
|
kAutoBackupDistanceInches = 20
|
2026-03-06 14:19:15 -08:00
|
|
|
kAutoDriveVelocity = 0.5
|
2026-02-20 18:30:35 -05:00
|
|
|
|
|
|
|
|
# Operator Interface
|
|
|
|
|
kDriverControllerPort = 0
|
|
|
|
|
|
|
|
|
|
# Physical parameters
|
|
|
|
|
kDriveTrainMotorCount = 2
|
|
|
|
|
kTrackWidth = 0.381 * 2
|
|
|
|
|
kGearingRatio = 8
|
|
|
|
|
kWheelRadius = 0.0508
|
|
|
|
|
|
|
|
|
|
# kEncoderResolution = -
|