10 #include <frc/geometry/Translation2d.h> 11 #include <frc/kinematics/SwerveDriveKinematics.h> 12 #include <frc/trajectory/TrapezoidProfile.h> 13 #include <units/time.h> 14 #include <units/velocity.h> 15 #include <units/acceleration.h> 18 #include <ctre/phoenix/CANifier.h> 21 using namespace units;
60 constexpr CANifier::PWMChannel
kFrontLeftPWM = CANifier::PWMChannel::PWMChannel0;
61 constexpr CANifier::PWMChannel
kFrontRightPWM = CANifier::PWMChannel::PWMChannel2;
62 constexpr CANifier::PWMChannel
kRearRightPWM = CANifier::PWMChannel::PWMChannel1;
63 constexpr CANifier::PWMChannel
kRearLeftPWM = CANifier::PWMChannel::PWMChannel3;
190 constexpr
int kSecondaryControllerPort = 0;
constexpr bool kDriveAdjust
constexpr int kCanifierID
CANifier CAN ID (for absolute encoder PWM inputs)
constexpr bool kTurnAdjust
constexpr double kWheelDiameterMeters
4"
constexpr double kFrontRightOffset
constexpr int kEncoderCPR
constexpr double kMinTargetDistance
constexpr double kMountingAngle
constexpr double kDThetaController
constexpr double kDriveGearRatio
MK3 swerve modules w/NEOs 12.1 ft/sec w/Falcon 13.6 ft/sec.
constexpr double kMinHoneDistance
constexpr double kMaxTargetDistance
constexpr double kRotationDriveMaxSpeed
Max speed for control.
constexpr double kRotationDriveI
constexpr uint kMotorCurrentLimit
constexpr int kEncoderTicksPerSec
TalonFX::GetSelectedSensorVelocity() returns ticks/100ms = 10 ticks/sec.
constexpr double kRotationDriveD
constexpr CANifier::PWMChannel kFrontRightPWM
constexpr int kRearRightDriveMotorPort
Rear Right Drive CAN ID (TalonFX)
constexpr auto kMaxAngularAcceleration
constexpr meter_t kTrackWidth
Distance between centers of left and right wheels on robot.
constexpr double kDeadzoneXY
constexpr double kPYController
constexpr double kP_ModuleTurningController
constexpr int kFrontLeftDriveMotorPort
Front Left Drive CAN ID (TalonFX)
constexpr int kNumSwerveModules
compound_unit< radians, inverse< squared< second >>> radians_per_second_squared_t
constexpr double kDeadzoneY
constexpr int kSecondaryControllerPort
constexpr int kPrimaryControllerPort
constexpr double kTurnEncoderCPR
constexpr double kRearRightOffset
const frc::TrapezoidProfile< units::radians >::Constraints kThetaControllerConstraints
constexpr double kRotationDriveTolerance
Tolerance for turning.
constexpr double kRotationDriveDirectionLimit
Speeds higher than value will prevent robot from changing directions for a turn.
constexpr double kDeadzoneX
constexpr auto kMaxAcceleration
constexpr double kPThetaController
constexpr int kFrontRightTurningMotorPort
Front Right Turn CAN ID (SparkMAX)
constexpr double kDeadzoneAbsRot
constexpr int kFrontRightDriveMotorPort
Front Right Drive CAN ID (TalonFX)
constexpr double kDriveFF
constexpr double kD_ModuleTurningController
constexpr double kTargetHeight
constexpr bool kGyroReversed
constexpr double kDXController
constexpr int kRearLeftDriveMotorPort
Rear Left Drive CAN ID (TalonFX)
constexpr CANifier::PWMChannel kRearLeftPWM
constexpr double kMountingHeight
constexpr meter_t kWheelBase
Distance between centers of front and back wheels on robot.
constexpr double kPulseWidthToZeroOne
constexpr auto kMaxAngularSpeed
constexpr int kFrontLeftTurningMotorPort
Front Left Turn CAN ID (SparkMAX)
constexpr double kRearLeftOffset
constexpr double kPulseWidthToRadians
constexpr double kMaxHoneDistance
constexpr double kDeadzoneRot
constexpr double kFrontLeftOffset
constexpr bool kRearRightDriveMotorReversed
constexpr CANifier::PWMChannel kFrontLeftPWM
constexpr int kRearRightTurningMotorPort
Rear Right Turn CAN ID (SparkMAX)
constexpr auto kDriveSpeed
constexpr bool kFrontRightDriveMotorReversed
constexpr bool kRearLeftDriveMotorReversed
constexpr CANifier::PWMChannel kRearRightPWM
constexpr int kRearLeftTurningMotorPort
constexpr double kRotationDriveIMaxRange
constexpr auto kDriveAngularSpeed
constexpr double kPModuleDriveController
constexpr double kPXController
constexpr double kDYController
constexpr double kTurnMotorRevsPerWheelRev
constexpr double kDriveEncoderMetersPerSec
constexpr double kRotationDriveP
constexpr bool kFrontLeftDriveMotorReversed