-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issues with using class methods
Signed-off-by: Alex Pereira <[email protected]>
- Loading branch information
1 parent
f0e9e14
commit 1724de0
Showing
7 changed files
with
75 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Import Libraries | ||
import cv2 as cv | ||
import cv2 as cv | ||
import numpy as np | ||
|
||
# Import Classes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import numpy as np | ||
from wpimath.geometry import * | ||
from frc_apriltags.Utilities.AprilTagFieldLayout import AprilTagFieldLayout | ||
|
||
field = AprilTagFieldLayout.fromJson("2023-chargedup", False) | ||
print(field.getTagPose(7)) | ||
|
||
pose1 = Pose3d( | ||
Translation3d(0, 0, 0), | ||
Rotation3d(0, 0, np.pi*0) | ||
) | ||
|
||
# Gets things in the right direction | ||
pose2 = Pose3d( | ||
Translation3d(1, 1, 0), | ||
Rotation3d(0, 0, 0) | ||
) | ||
trans1 = Transform3d( | ||
Translation3d(), | ||
Rotation3d(pose1.rotation().X(), pose1.rotation().Y(), pose1.rotation().Z()) | ||
) | ||
pose2 = pose2.transformBy(trans1) | ||
|
||
# | ||
trans2 = Transform3d( | ||
pose2.translation(), | ||
pose2.rotation() | ||
) | ||
|
||
print(pose1.transformBy(trans2).toPose2d()) |