Class TunerConstants2025
java.lang.Object
frc.alotobots.library.subsystems.swervedrive.constants.mk4i2025.TunerConstants2025
- All Implemented Interfaces:
TunerConstants
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.ctre.phoenix6.swerve.SwerveModuleConstants<com.ctre.phoenix6.configs.TalonFXConfiguration,
com.ctre.phoenix6.configs.TalonFXConfiguration, com.ctre.phoenix6.configs.CANcoderConfiguration> Gets the configuration constants for the back left swerve module.com.ctre.phoenix6.swerve.SwerveModuleConstants<com.ctre.phoenix6.configs.TalonFXConfiguration,
com.ctre.phoenix6.configs.TalonFXConfiguration, com.ctre.phoenix6.configs.CANcoderConfiguration> Gets the configuration constants for the back right swerve module.Gets the length of the robot with bumpers.Gets the width of the robot with bumpers.double
Gets the radius of the drive base from center to furthest module.Gets the PID controller for maintaining robot heading while driving.com.ctre.phoenix6.configs.Slot0Configs
Gets the PID gains for the drive motors.com.ctre.phoenix6.swerve.SwerveDrivetrainConstants
Gets the general drivetrain constants for the swerve drive.org.ironmaple.simulation.drivesims.configs.DriveTrainSimulationConfig
Gets the simulation config for Maple-Simcom.ctre.phoenix6.swerve.SwerveModuleConstants<com.ctre.phoenix6.configs.TalonFXConfiguration,
com.ctre.phoenix6.configs.TalonFXConfiguration, com.ctre.phoenix6.configs.CANcoderConfiguration> Gets the configuration constants for the front left swerve module.com.ctre.phoenix6.swerve.SwerveModuleConstants<com.ctre.phoenix6.configs.TalonFXConfiguration,
com.ctre.phoenix6.configs.TalonFXConfiguration, com.ctre.phoenix6.configs.CANcoderConfiguration> Gets the configuration constants for the front right swerve module.com.pathplanner.lib.controllers.PPHolonomicDriveController
Gets the holonomic drive controller for path following.double
Gets the maximum rotational rate of individual modules.Gets the physical positions of all swerve modules relative to the robot center.Gets the robot's standard operating speed.double
Gets the frequency at which odometry updates are processed.com.pathplanner.lib.path.PathConstraints
Gets the constraints for PathPlanner pathfinding.com.pathplanner.lib.config.RobotConfig
Gets the PathPlanner configuration for the robot.double
Gets the radius in which precision align should functioncom.pathplanner.lib.controllers.PPHolonomicDriveController
Gets the precision align holonomic drive controller for path following.double
Gets the precision align tolerance (when it stops trying to correct)Gets the robot's maximum speed at 12 volts.com.ctre.phoenix6.configs.Slot0Configs
Gets the PID gains for the steer motors.Gets the robot's maximum boosted speed.Gets the robot's reduced speed for precision control.
-
Constructor Details
-
TunerConstants2025
public TunerConstants2025()
-
-
Method Details
-
getFrontLeft
public com.ctre.phoenix6.swerve.SwerveModuleConstants<com.ctre.phoenix6.configs.TalonFXConfiguration,com.ctre.phoenix6.configs.TalonFXConfiguration, getFrontLeft()com.ctre.phoenix6.configs.CANcoderConfiguration> Description copied from interface:TunerConstants
Gets the configuration constants for the front left swerve module.- Specified by:
getFrontLeft
in interfaceTunerConstants
- Returns:
- SwerveModuleConstants containing TalonFX and CANcoder configurations for the front left module
-
getFrontRight
public com.ctre.phoenix6.swerve.SwerveModuleConstants<com.ctre.phoenix6.configs.TalonFXConfiguration,com.ctre.phoenix6.configs.TalonFXConfiguration, getFrontRight()com.ctre.phoenix6.configs.CANcoderConfiguration> Description copied from interface:TunerConstants
Gets the configuration constants for the front right swerve module.- Specified by:
getFrontRight
in interfaceTunerConstants
- Returns:
- SwerveModuleConstants containing TalonFX and CANcoder configurations for the front right module
-
getBackLeft
public com.ctre.phoenix6.swerve.SwerveModuleConstants<com.ctre.phoenix6.configs.TalonFXConfiguration,com.ctre.phoenix6.configs.TalonFXConfiguration, getBackLeft()com.ctre.phoenix6.configs.CANcoderConfiguration> Description copied from interface:TunerConstants
Gets the configuration constants for the back left swerve module.- Specified by:
getBackLeft
in interfaceTunerConstants
- Returns:
- SwerveModuleConstants containing TalonFX and CANcoder configurations for the back left module
-
getBackRight
public com.ctre.phoenix6.swerve.SwerveModuleConstants<com.ctre.phoenix6.configs.TalonFXConfiguration,com.ctre.phoenix6.configs.TalonFXConfiguration, getBackRight()com.ctre.phoenix6.configs.CANcoderConfiguration> Description copied from interface:TunerConstants
Gets the configuration constants for the back right swerve module.- Specified by:
getBackRight
in interfaceTunerConstants
- Returns:
- SwerveModuleConstants containing TalonFX and CANcoder configurations for the back right module
-
getDrivetrainConstants
public com.ctre.phoenix6.swerve.SwerveDrivetrainConstants getDrivetrainConstants()Description copied from interface:TunerConstants
Gets the general drivetrain constants for the swerve drive.- Specified by:
getDrivetrainConstants
in interfaceTunerConstants
- Returns:
- SwerveDrivetrainConstants containing overall drivetrain configuration
-
getPathfindingConstraints
public com.pathplanner.lib.path.PathConstraints getPathfindingConstraints()Description copied from interface:TunerConstants
Gets the constraints for PathPlanner pathfinding.- Specified by:
getPathfindingConstraints
in interfaceTunerConstants
- Returns:
- PathConstraints containing velocity and acceleration limits
-
getHolonomicDriveController
public com.pathplanner.lib.controllers.PPHolonomicDriveController getHolonomicDriveController()Description copied from interface:TunerConstants
Gets the holonomic drive controller for path following.- Specified by:
getHolonomicDriveController
in interfaceTunerConstants
- Returns:
- PPHolonomicDriveController for path following control
-
getPrecisionAlignHolonomicDriveController
public com.pathplanner.lib.controllers.PPHolonomicDriveController getPrecisionAlignHolonomicDriveController()Description copied from interface:TunerConstants
Gets the precision align holonomic drive controller for path following.- Specified by:
getPrecisionAlignHolonomicDriveController
in interfaceTunerConstants
- Returns:
- PPHolonomicDriveController for path following control
-
getBumperLength
Description copied from interface:TunerConstants
Gets the length of the robot with bumpers.- Specified by:
getBumperLength
in interfaceTunerConstants
- Returns:
- The bumper length as a Distance
-
getBumperWidth
Description copied from interface:TunerConstants
Gets the width of the robot with bumpers.- Specified by:
getBumperWidth
in interfaceTunerConstants
- Returns:
- The bumper width as a Distance
-
getDriveBaseRadius
public double getDriveBaseRadius()Description copied from interface:TunerConstants
Gets the radius of the drive base from center to furthest module.- Specified by:
getDriveBaseRadius
in interfaceTunerConstants
- Returns:
- The drive base radius in meters
-
getOdometryFrequency
public double getOdometryFrequency()Description copied from interface:TunerConstants
Gets the frequency at which odometry updates are processed.- Specified by:
getOdometryFrequency
in interfaceTunerConstants
- Returns:
- The odometry update frequency in hertz
-
getSteerGains
public com.ctre.phoenix6.configs.Slot0Configs getSteerGains()Description copied from interface:TunerConstants
Gets the PID gains for the steer motors.- Specified by:
getSteerGains
in interfaceTunerConstants
- Returns:
- Slot0Configs containing PID and feedforward gains for steering
-
getDriveGains
public com.ctre.phoenix6.configs.Slot0Configs getDriveGains()Description copied from interface:TunerConstants
Gets the PID gains for the drive motors.- Specified by:
getDriveGains
in interfaceTunerConstants
- Returns:
- Slot0Configs containing PID and feedforward gains for driving
-
getSpeedAt12Volts
Description copied from interface:TunerConstants
Gets the robot's maximum speed at 12 volts.- Specified by:
getSpeedAt12Volts
in interfaceTunerConstants
- Returns:
- The maximum speed as a LinearVelocity
-
getTurtleSpeed
Description copied from interface:TunerConstants
Gets the robot's reduced speed for precision control.- Specified by:
getTurtleSpeed
in interfaceTunerConstants
- Returns:
- The turtle mode speed as a LinearVelocity
-
getNominalSpeed
Description copied from interface:TunerConstants
Gets the robot's standard operating speed.- Specified by:
getNominalSpeed
in interfaceTunerConstants
- Returns:
- The nominal speed as a LinearVelocity
-
getTurboSpeed
Description copied from interface:TunerConstants
Gets the robot's maximum boosted speed.- Specified by:
getTurboSpeed
in interfaceTunerConstants
- Returns:
- The turbo mode speed as a LinearVelocity
-
getMaxModularRotationalRate
public double getMaxModularRotationalRate()Description copied from interface:TunerConstants
Gets the maximum rotational rate of individual modules.- Specified by:
getMaxModularRotationalRate
in interfaceTunerConstants
- Returns:
- The maximum rotational rate in radians per second
-
getPathPlannerConfig
public com.pathplanner.lib.config.RobotConfig getPathPlannerConfig()Description copied from interface:TunerConstants
Gets the PathPlanner configuration for the robot.- Specified by:
getPathPlannerConfig
in interfaceTunerConstants
- Returns:
- RobotConfig containing PathPlanner-specific settings
-
getDriveFacingAnglePIDController
Description copied from interface:TunerConstants
Gets the PID controller for maintaining robot heading while driving.- Specified by:
getDriveFacingAnglePIDController
in interfaceTunerConstants
- Returns:
- ProfiledPIDController for heading control
-
getPrecisionAlignTolerance
public double getPrecisionAlignTolerance()Description copied from interface:TunerConstants
Gets the precision align tolerance (when it stops trying to correct)- Specified by:
getPrecisionAlignTolerance
in interfaceTunerConstants
- Returns:
- double of tolerance
-
getPrecisionAlignAllowRadius
public double getPrecisionAlignAllowRadius()Description copied from interface:TunerConstants
Gets the radius in which precision align should function- Specified by:
getPrecisionAlignAllowRadius
in interfaceTunerConstants
- Returns:
- double of tolerance
-
getDriveTrainSimulationConfig
public org.ironmaple.simulation.drivesims.configs.DriveTrainSimulationConfig getDriveTrainSimulationConfig()Description copied from interface:TunerConstants
Gets the simulation config for Maple-Sim- Specified by:
getDriveTrainSimulationConfig
in interfaceTunerConstants
- Returns:
- The simulation config
-
getModuleTranslations
Description copied from interface:TunerConstants
Gets the physical positions of all swerve modules relative to the robot center.- Specified by:
getModuleTranslations
in interfaceTunerConstants
- Returns:
- Array of Translation2d representing module positions
-