Class DriverControllerConfig
Each d-pad direction has its own DpadTargetConfig holding the target field pose. All four directions share one set of PathPlanner
pathfinding constraints (velocity and acceleration limits). Targets are stored in blue-alliance coordinates and flipped at runtime for red.
Trench zones define rectangular areas on the field where the robot must maintain a specific heading while passing through. When a d-pad pathfinding route crosses a trench zone, intermediate waypoints are inserted at the zone entry and exit so the robot passes through at the correct heading.
-
Nested Class Summary
Nested classes/interfaces inherited from class frc.robot.shared.config.AbstractConfig
AbstractConfig.ComponentPoseConfig -
Field Summary
FieldsModifier and TypeFieldDescriptionTarget pose for the d-pad down button.Target pose for the d-pad left button.doubleMaximum linear acceleration for d-pad pathfinding in meters per second squared.doubleMaximum angular acceleration for d-pad pathfinding in degrees per second squared.doubleMaximum angular velocity for d-pad pathfinding in degrees per second.doubleMaximum linear velocity for d-pad pathfinding in meters per second.Target pose for the d-pad right button.Target pose for the d-pad up button.Trench zones that require heading alignment when the robot pathfinds through them. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindIntersectingTrenchZone(edu.wpi.first.math.geometry.Pose2d currentPose, edu.wpi.first.math.geometry.Pose2d targetPose) Finds the first enabled trench zone that a straight-line path from the current pose to the target crosses.doubleReads the tunable maximum linear acceleration for d-pad pathfinding.doubleReads the tunable maximum angular acceleration for d-pad pathfinding in degrees per second squared.doubleReads the tunable maximum angular velocity for d-pad pathfinding in degrees per second.doubleReads the tunable maximum linear velocity for d-pad pathfinding.Methods inherited from class frc.robot.shared.config.AbstractConfig
getDashboardPrefix, initializeNestedDashboardPrefixes, readTunableBoolean, readTunableDegrees, readTunableDegreesAsRadians, readTunableNumber, readTunableString, setDashboardPrefix
-
Field Details
-
dpadUp
Target pose for the d-pad up button. -
dpadDown
Target pose for the d-pad down button. -
dpadLeft
Target pose for the d-pad left button. -
dpadRight
Target pose for the d-pad right button. -
trenchZones
Trench zones that require heading alignment when the robot pathfinds through them.All zones are defined in field (blue-alliance) coordinates. Trenches are physical field features on both halves of the field, so zones should cover both the blue-side and red-side trenches. When a d-pad pathfinding route crosses any enabled zone, entry and exit waypoints are inserted so the robot arrives at the trench with the correct heading.
-
dpadMaxVelocityMetersPerSecond
public double dpadMaxVelocityMetersPerSecondMaximum linear velocity for d-pad pathfinding in meters per second.Applies to all four d-pad directions. A conservative value (e.g., 3.0 m/s) keeps the robot under control during teleop pathfinding.
-
dpadMaxAccelerationMetersPerSecondSquared
public double dpadMaxAccelerationMetersPerSecondSquaredMaximum linear acceleration for d-pad pathfinding in meters per second squared. -
dpadMaxAngularVelocityDegreesPerSecond
public double dpadMaxAngularVelocityDegreesPerSecondMaximum angular velocity for d-pad pathfinding in degrees per second.Stored in degrees for consistency with other config values. Converted to radians at the call site.
-
dpadMaxAngularAccelerationDegreesPerSecondSquared
public double dpadMaxAngularAccelerationDegreesPerSecondSquaredMaximum angular acceleration for d-pad pathfinding in degrees per second squared.Stored in degrees for consistency with other config values. Converted to radians at the call site.
-
-
Constructor Details
-
DriverControllerConfig
public DriverControllerConfig()
-
-
Method Details
-
getDpadMaxVelocityMetersPerSecond
public double getDpadMaxVelocityMetersPerSecond()Reads the tunable maximum linear velocity for d-pad pathfinding.- Returns:
- maximum velocity in meters per second
-
getDpadMaxAccelerationMetersPerSecondSquared
public double getDpadMaxAccelerationMetersPerSecondSquared()Reads the tunable maximum linear acceleration for d-pad pathfinding.- Returns:
- maximum acceleration in meters per second squared
-
getDpadMaxAngularVelocityDegreesPerSecond
public double getDpadMaxAngularVelocityDegreesPerSecond()Reads the tunable maximum angular velocity for d-pad pathfinding in degrees per second.- Returns:
- maximum angular velocity in degrees per second
-
getDpadMaxAngularAccelerationDegreesPerSecondSquared
public double getDpadMaxAngularAccelerationDegreesPerSecondSquared()Reads the tunable maximum angular acceleration for d-pad pathfinding in degrees per second squared.- Returns:
- maximum angular acceleration in degrees per second squared
-
findIntersectingTrenchZone
public TrenchZoneConfig findIntersectingTrenchZone(edu.wpi.first.math.geometry.Pose2d currentPose, edu.wpi.first.math.geometry.Pose2d targetPose) Finds the first enabled trench zone that a straight-line path from the current pose to the target crosses.Both poses must be in field (blue-alliance) coordinates. This method checks all configured trench zones regardless of alliance color, since trenches are physical field features on both halves of the field.
- Parameters:
currentPose- robot's current odometry pose in field coordinatestargetPose- target pose in field coordinates (already alliance-flipped)- Returns:
- the first intersecting
TrenchZoneConfig, ornullif no zone is crossed
-