-
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.
- Loading branch information
1 parent
481ef54
commit 22f70db
Showing
3 changed files
with
38 additions
and
0 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
23 changes: 23 additions & 0 deletions
23
src/main/java/org/team1540/robot2024/util/MechanismVisualiser.java
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,23 @@ | ||
package org.team1540.robot2024.util; | ||
|
||
import edu.wpi.first.math.geometry.Pose3d; | ||
import edu.wpi.first.math.geometry.Rotation2d; | ||
import edu.wpi.first.math.geometry.Rotation3d; | ||
import org.littletonrobotics.junction.Logger; | ||
|
||
public class MechanismVisualiser { | ||
private static Pose3d shooterPivot = new Pose3d(); | ||
private static Pose3d elevator = new Pose3d(); | ||
|
||
public static void periodic() { | ||
Logger.recordOutput("Mechanisms", shooterPivot, elevator); | ||
} | ||
|
||
public static void setElevatorPosition(double positionMeters) { | ||
elevator = new Pose3d(0.0, 0.0, positionMeters, new Rotation3d()); | ||
} | ||
|
||
public static void setShooterPivotRotation(Rotation2d rotation) { | ||
shooterPivot = new Pose3d(0.0, 0.0, 0.0, new Rotation3d(0, rotation.getRadians(), 0)); | ||
} | ||
} |