Skip to content

Commit

Permalink
added shot point logging into advantage scope
Browse files Browse the repository at this point in the history
  • Loading branch information
PGgit08 committed Apr 2, 2024
1 parent 86ff8a6 commit 1e9eef9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/frc/robot/subsystems/SwerveDriveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public class SwerveDriveSubsystem extends SubsystemBase {
StructPublisher<Pose2d> posePublisher = NetworkTableInstance.getDefault()
.getStructTopic("/Advantage Robot Pose", Pose2d.struct).publish();

StructPublisher<Pose3d> shotPointPublisher = NetworkTableInstance.getDefault()
.getStructTopic("/Advantage Shot Point", Pose3d.struct).publish();

// Pose Estimator -> Has built in odometry and uses supplied vision measurements
private final SwerveDrivePoseEstimator _estimator = new SwerveDrivePoseEstimator(
Constants.Physical.SWERVE_KINEMATICS, getHeadingRaw(),
Expand Down Expand Up @@ -128,6 +131,8 @@ public SwerveDriveSubsystem(VisionSubsystem visionSubsystem) {
_headingController.setTolerance(2);
_headingController.enableContinuousInput(-180, 180);

resetPose(new Pose2d(5, 5, Rotation2d.fromDegrees(180)));

// setupOrchestra();

// pathplannerlib setup
Expand Down Expand Up @@ -181,6 +186,7 @@ public void initSendable(SendableBuilder builder) {
public void periodic() {
swervePublisher.set(states);
posePublisher.set(getPose());
shotPointPublisher.set(UtilFuncs.GetSpeakerPose());

SmartDashboard.putBoolean("VALID TAG(S)", updateBotpose());

Expand Down

0 comments on commit 1e9eef9

Please sign in to comment.