Class RotTrlTransform3d
java.lang.Object
org.photonvision.estimation.RotTrlTransform3d
Represents a transformation that first rotates a pose around the origin, and then translates it.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs the identity transform -- maps an initial pose to itself.RotTrlTransform3d(org.wpilib.math.geometry.Pose3d initial, org.wpilib.math.geometry.Pose3d last) RotTrlTransform3d(org.wpilib.math.geometry.Rotation3d rot, org.wpilib.math.geometry.Translation3d trl) A rotation-translation transformation.RotTrlTransform3d(org.wpilib.math.geometry.Transform3d trf) Creates a rotation-translation transformation from a Transform3d. -
Method Summary
Modifier and TypeMethodDescriptionorg.wpilib.math.geometry.Pose3dapply(org.wpilib.math.geometry.Pose3d pose) org.wpilib.math.geometry.Rotation3dapply(org.wpilib.math.geometry.Rotation3d rot) org.wpilib.math.geometry.Translation3dapply(org.wpilib.math.geometry.Translation3d trl) List<org.wpilib.math.geometry.Pose3d> applyPoses(List<org.wpilib.math.geometry.Pose3d> poses) List<org.wpilib.math.geometry.Rotation3d> List<org.wpilib.math.geometry.Translation3d> org.wpilib.math.geometry.Rotation3dThe rotation component of this transformationorg.wpilib.math.geometry.Transform3dThis transformation as a Transform3d (as if of the origin)org.wpilib.math.geometry.Translation3dThe translation component of this transformationinverse()The inverse of this transformation.static RotTrlTransform3dmakeRelativeTo(org.wpilib.math.geometry.Pose3d pose) The rotation-translation transformation that makes poses in the world consider this pose as the new origin, or change the basis to this pose.
-
Constructor Details
-
RotTrlTransform3d
public RotTrlTransform3d(org.wpilib.math.geometry.Rotation3d rot, org.wpilib.math.geometry.Translation3d trl) A rotation-translation transformation.Applying this RotTrlTransform3d to poses will preserve their current origin-to-pose transform as if the origin was transformed by these components instead.
- Parameters:
rot- The rotation componenttrl- The translation component
-
RotTrlTransform3d
public RotTrlTransform3d(org.wpilib.math.geometry.Pose3d initial, org.wpilib.math.geometry.Pose3d last) -
RotTrlTransform3d
Creates a rotation-translation transformation from a Transform3d.Applying this RotTrlTransform3d to poses will preserve their current origin-to-pose transform as if the origin was transformed by trf instead.
- Parameters:
trf- The origin transformation
-
RotTrlTransform3d
public RotTrlTransform3d()Constructs the identity transform -- maps an initial pose to itself.
-
-
Method Details
-
makeRelativeTo
The rotation-translation transformation that makes poses in the world consider this pose as the new origin, or change the basis to this pose.- Parameters:
pose- The new origin
-
inverse
The inverse of this transformation. Applying the inverse will "undo" this transformation.- Returns:
- The inverse transformation
-
getTransform
This transformation as a Transform3d (as if of the origin)- Returns:
- The Transform2d
-
getTranslation
The translation component of this transformation- Returns:
- The Translation3d
-
getRotation
The rotation component of this transformation- Returns:
- The Rotation3d
-
apply
-
applyTrls
-
apply
-
applyRots
-
apply
-
applyPoses
public List<org.wpilib.math.geometry.Pose3d> applyPoses(List<org.wpilib.math.geometry.Pose3d> poses)
-