Class AprilTagVisionSubsystemConfig
java.lang.Object
frc.robot.shared.config.AbstractConfig
frc.robot.shared.config.AbstractSubsystemConfig
frc.robot.subsystems.apriltagvision.config.AprilTagVisionSubsystemConfig
Configuration bundle for the AprilTag vision subsystem. Values are mirrored to SmartDashboard so they can be tuned live without redeploying
firmware.
Includes the field layout type selector so each robot variant (competition, test, sim) can specify its own AprilTag field layout in the subsystems JSON file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested class for JSON deserialization of camera transforms.static enumEnumerates the supported AprilTag field layouts for the 2026 game.Nested classes/interfaces inherited from class frc.robot.shared.config.AbstractConfig
AbstractConfig.ComponentPoseConfig -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringEnum name of the AndyMark field layout to load.Camera names and their robot-to-camera transforms.Field type selector used to pick between field layouts.static final StringEnum name for the AprilTag layout origin to apply.Pose quality filters and trust parameters.static final StringDeploy-relative path for the shop field layout.static final StringEnum name of the welded field layout to load.Fields inherited from class frc.robot.shared.config.AbstractSubsystemConfig
enabled, verbose -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the configured camera map.Returns the configured field type selector.Returns the pose filter configuration.edu.wpi.first.apriltag.AprilTagFieldLayoutBuilds an AprilTag field layout using the configured field type and origin.Methods inherited from class frc.robot.shared.config.AbstractSubsystemConfig
getVerboseMethods inherited from class frc.robot.shared.config.AbstractConfig
getDashboardPrefix, initializeNestedDashboardPrefixes, readTunableBoolean, readTunableDegrees, readTunableDegreesAsRadians, readTunableNumber, readTunableString, setDashboardPrefix
-
Field Details
-
WELDED_FIELD
Enum name of the welded field layout to load.- See Also:
-
ANDY_MARK_FIELD
Enum name of the AndyMark field layout to load.- See Also:
-
SHOP_FIELD
Deploy-relative path for the shop field layout.- See Also:
-
ORIGIN
Enum name for the AprilTag layout origin to apply.- See Also:
-
fieldType
Field type selector used to pick between field layouts. -
cameras
Camera names and their robot-to-camera transforms. Each transform defines the camera position relative to robot center: (x forward, y left, z up). -
poseFilter
Pose quality filters and trust parameters. Grouped into a sub-config so they can be tuned as a unit from the dashboard or adjusted in the deploy JSON.
-
-
Constructor Details
-
AprilTagVisionSubsystemConfig
public AprilTagVisionSubsystemConfig()
-
-
Method Details
-
getCameras
Returns the configured camera map.- Returns:
- map of camera names to robot-to-camera transforms
-
getPoseFilter
Returns the pose filter configuration.- Returns:
- pose filter sub-config with all filtering thresholds
-
getFieldType
Returns the configured field type selector.Use this to determine which AprilTag field layout is loaded for pose estimation.
- Returns:
- selected field layout type
-
loadLayout
public edu.wpi.first.apriltag.AprilTagFieldLayout loadLayout()Builds an AprilTag field layout using the configured field type and origin.Call this once during subsystem construction so tags can be accessed with
getTagPose(int)for navigation targets.- Returns:
- loaded AprilTag field layout with the configured origin applied
- Throws:
IllegalArgumentException- when the configured enum names are invalid
-