Skip to content

Commit

Permalink
add Pose 3d logger?
Browse files Browse the repository at this point in the history
@GalexY727 i mist be going insane but where do we log our robot pose
  • Loading branch information
Jacob1010-h committed Dec 5, 2023
1 parent b2e8698 commit 295adf4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/subsystems/Swerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public Swerve() {
public void periodic() {

Update the poseEstimator using the current timestamp (from DriverUI.java), the gyro angle, and the current module states

if (FieldConstants.IS_SIMULATION) {

for (MAXSwerveModule mod : swerveModules) {
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/frc/robot/util/Pose3dLogger.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package frc.robot.util;

import edu.wpi.first.math.geometry.Pose3d;
import io.github.oblarg.oblog.Logger;
import io.github.oblarg.oblog.annotations.Log;

public class Pose3dLogger extends Logger{
@Log
private Pose3d pose = new Pose3d();

public Pose3dLogger(Pose3d pose) {
this.pose = pose;
}

public Pose3d getPose() {
return this.pose;
}

public void setPose(Pose3d pose) {
this.pose = pose;
}
}

1 comment on commit 295adf4

@GalexY727
Copy link
Member

@GalexY727 GalexY727 commented on 295adf4 Dec 6, 2023 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.