Class BiAlliancePose3d

java.lang.Object
frc.robot.util.BiAlliancePose3d

public class BiAlliancePose3d extends Object
A Pose3d that contains versions for the Blue and Red alliances.
  • Field Details

    • bluePose

      public final Pose3d bluePose
      The pose on the blue alliance.
    • redPose

      public final Pose3d redPose
      The pose on the red alliance.
  • Method Details

    • fromBluePose

      public static BiAlliancePose3d fromBluePose(Pose3d bluePose, BiAlliancePose3d.InvertY invertY)
      Creates a BiAlliancePose3d from a pose on the blue alliance.
      Parameters:
      bluePose - The pose on the blue alliance.
      invertY - Should the Y value be inverted?
    • fromRedPose

      public static BiAlliancePose3d fromRedPose(Pose3d redPose, BiAlliancePose3d.InvertY invertY)
      Creates a BiAlliancePose2d from a pose on the red alliance.
      Parameters:
      redPose - The pose on the red alliance.
      invertY - Should the Y value be inverted?
    • getBluePose

      public Pose3d getBluePose()
      Gets this pose on the blue alliance.
      Returns:
      The pose on the blue alliance.
      See Also:
    • getRedPose

      public Pose3d getRedPose()
      Gets this pose on the red alliance.
      Returns:
      The pose on the red alliance.
      See Also:
    • getPoseByAlliance

      public Pose3d getPoseByAlliance()
      Gets this pose for the current alliance.
      Returns:
      The pose for the current alliance.