Skip to content

Commit

Permalink
updated photon and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ori-coval committed Jan 16, 2024
1 parent 56b478c commit ccd5142
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/main/java/frc/Utils/PathPlanner/PathPlannerHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
import java.util.List;
import com.pathplanner.lib.auto.AutoBuilder;
import com.pathplanner.lib.path.GoalEndState;
import com.pathplanner.lib.path.PathConstraints;
import com.pathplanner.lib.path.PathPlannerPath;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Translation2d;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine.Direction;
import frc.Utils.PathPlanner.PathPlannerHelper;
import frc.robot.Constants.Swerve;
import frc.robot.subsystems.SwerveSubsystem;

/** Add your docs here. */
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package frc.robot;

import com.pathplanner.lib.path.GoalEndState;
import com.pathplanner.lib.path.PathPlannerPath;

import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Translation2d;
import edu.wpi.first.wpilibj.GenericHID;
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/frc/robot/subsystems/SwerveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import edu.wpi.first.math.kinematics.ChassisSpeeds;
import edu.wpi.first.math.kinematics.SwerveDriveKinematics;
import edu.wpi.first.math.kinematics.SwerveDriveOdometry;
import edu.wpi.first.math.kinematics.SwerveModulePosition;

import com.ctre.phoenix.motorcontrol.can.TalonSRX;
Expand Down Expand Up @@ -325,8 +324,8 @@ public void simulationPeriodic() {
simModPose.angle = getSimStates()[0].angle;
simModPose.distanceMeters += getSimStates()[0].speedMetersPerSecond * 0.02;

for (SwerveModulePosition pose : poses) {
pose = simModPose;
for (int i = 0; i<4; i++) {
poses[i] = simModPose;
}

poseEstimation.update(simYaw, poses);
Expand Down
12 changes: 6 additions & 6 deletions vendordeps/photonlib.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"fileName": "photonlib.json",
"name": "photonlib",
"version": "v2024.1.2",
"version": "v2024.2.0",
"uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004",
"frcYear": "2024",
"mavenUrls": [
"https://maven.photonvision.org/repository/internal",
"https://maven.photonvision.org/repository/snapshots"
],
"jsonUrl": "https://maven.photonvision.org/repository/internal/org/photonvision/PhotonLib-json/1.0/PhotonLib-json-1.0.json",
"jsonUrl": "https://maven.photonvision.org/repository/internal/org/photonvision/photonlib-json/1.0/photonlib-json-1.0.json",
"jniDependencies": [],
"cppDependencies": [
{
"groupId": "org.photonvision",
"artifactId": "photonlib-cpp",
"version": "v2024.1.2",
"version": "v2024.2.0",
"libName": "photonlib",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -29,7 +29,7 @@
{
"groupId": "org.photonvision",
"artifactId": "photontargeting-cpp",
"version": "v2024.1.2",
"version": "v2024.2.0",
"libName": "photontargeting",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -46,12 +46,12 @@
{
"groupId": "org.photonvision",
"artifactId": "photonlib-java",
"version": "v2024.1.2"
"version": "v2024.2.0"
},
{
"groupId": "org.photonvision",
"artifactId": "photontargeting-java",
"version": "v2024.1.2"
"version": "v2024.2.0"
}
]
}

0 comments on commit ccd5142

Please sign in to comment.