- class frc_apriltags.Utilities.AprilTag(id: int = 0, pose: Pose3d = Pose3d(Translation3d(x=0.000000, y=0.000000, z=0.000000), Rotation3d(x=0.000000, y=0.000000, z=0.000000)))
Bases:
objectUse this class to generate an object with the properties of an AprilTag.
- Parameters:
id – The id of the AprilTag.
pose – The
Pose3dof the AprilTag.
- classmethod fromDetailed(id: int, x: float, y: float, z: float, roll: float, pitch: float, yaw: float)
Constructor for the AprilTag class.
- Parameters:
id – The id of the AprilTag.
x – The x offset in meters.
y – The y offset in meters.
z – The z offset in meters.
roll – Rotaton around the tag’s z axis in radians.
pitch – Rotation around the tags’s x axis in radians.
yaw – Rotation around the tag’s y axis in radians.
- classmethod fromMatrix(id: int, x: float, y: float, z: float, rMatrix)
Constructor for the AprilTag class.
- Parameters:
id – The id of the AprilTag.
x – The x offset in meters.
y – The y offset in meters.
z – The z offset in meters.
rMatrix – The 3x3 Rotation Matrix.
- classmethod fromPoseComponents(id: int, trans: Translation3d, rot: Rotation3d)
Constructor for the AprilTag class.
- Parameters:
id – The id of the AprilTag.
trans – The
Translation3dof the AprilTag.rot – The
Rotation3dof the AprilTag.
- classmethod fromQuaternion(id: int, x: float, y: float, z: float, q: Quaternion)
Constructor for the AprilTag class.
- Parameters:
id – The id of the AprilTag.
x – The x offset in meters.
y – The y offset in meters.
z – The z offset in meters.
q – The 4x4 Quaterion.
- getPose() Pose3d
Gets the pose of the given tag.
- Returns:
The
Pose3dof the AprilTag.