Skip to content

Commit

Permalink
quals day 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ani-8712 committed Sep 29, 2024
1 parent ef25a62 commit 21b8b78
Show file tree
Hide file tree
Showing 12 changed files with 3,099 additions and 52 deletions.
558 changes: 558 additions & 0 deletions choreo.chor

Large diffs are not rendered by default.

308 changes: 286 additions & 22 deletions src/main/deploy/choreo/f3 to shoot2.1.traj

Large diffs are not rendered by default.

308 changes: 286 additions & 22 deletions src/main/deploy/choreo/f3 to shoot2.traj

Large diffs are not rendered by default.

467 changes: 467 additions & 0 deletions src/main/deploy/choreo/f3 to shoot3.1.traj

Large diffs are not rendered by default.

467 changes: 467 additions & 0 deletions src/main/deploy/choreo/f3 to shoot3.traj

Large diffs are not rendered by default.

509 changes: 509 additions & 0 deletions src/main/deploy/choreo/s3 preload and move.1.traj

Large diffs are not rendered by default.

509 changes: 509 additions & 0 deletions src/main/deploy/choreo/s3 preload and move.traj

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/main/java/team3647/frc2024/constants/PivotConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ public class PivotConstants {
public static final InterpolatingDoubleTreeMap kMasterTrapMap =
new InterpolatingDoubleTreeMap();

public static final InterpolatingDoubleTreeMap feedmap =
new InterpolatingDoubleTreeMap();

static {
// kMasterSpeakerMap.put(0.0, 60.0);
// kMasterSpeakerMap.put(1.3, 60.0);
Expand Down Expand Up @@ -108,6 +111,9 @@ public class PivotConstants {
kMasterSpeakerMap.put(20.0, 20.7); // //
kMasterAmpMap.put(0.0, 60.0);
kMasterAmpMap.put(100.0, 60.0);
feedmap.put(10.0, 60.0);
feedmap.put(0.0, 20.7);

Slot0Configs kMasterSlot0 = new Slot0Configs();
CurrentLimitsConfigs kMasterCurrent = new CurrentLimitsConfigs();
MotionMagicConfigs kMasterMotionMagic = new MotionMagicConfigs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ public class ShooterConstants {
kRightMap.put(8.5, 18.0);
kRightMap.put(20.0, 18.0);

kFeedMap.put(0.0, 11.0);
kFeedMap.put(8.0, 11.0);
kFeedMap.put(12.0, 13.5);
kFeedMap.put(20.0, 13.5);
kFeedMap.put(0.0, 3.0);
kFeedMap.put(8.0, 3.0);
kFeedMap.put(12.0, 3.0);
kFeedMap.put(20.0, 3.0);

Slot0Configs kRightSlot0 = new Slot0Configs();
Slot0Configs kLeftSlot0 = new Slot0Configs();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/team3647/frc2024/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public Command getAutonomousCommand() {
swerve::getOdoPose,
swerve::getChassisSpeeds,
ShooterConstants.kLeftMap,
true);
false);

public final TargetingUtil targetingUtil = new TargetingUtil(tracker);

Expand Down
6 changes: 4 additions & 2 deletions src/main/java/team3647/frc2024/subsystems/Superstructure.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public class Superstructure {
private final double churroDeployAngle = 70;
private final double churroStowAngle = ChurroConstants.kInitialDegree;
private final double shootSpeed;
private double currentLimit = 32;
private double currentLimit = 70;

;
private boolean hasPiece = false;
private boolean isClimbing;
private boolean isIntaking = false;
Expand Down Expand Up @@ -163,7 +165,7 @@ public Command stowChurro() {
}

public Command spinUpAmp() {
return shooterCommands.setVelocity(() -> 6.5, () -> 2.3);
return shooterCommands.setVelocity(() -> 6.5, () -> 4.0);
}

public Command setShootModeStationary() {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/team3647/frc2024/util/TargetingUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import team3647.frc2024.constants.PivotConstants;
import team3647.frc2024.subsystems.Pivot;

public class TargetingUtil {

Expand Down Expand Up @@ -103,7 +104,7 @@ public AimingParameters feedOnTheMove(Pose2d pose) {
Pose2d shotPose = robotTracker.compensateFeed(robotTracker.getPose());
double pivotAngle =
Math.toRadians(
speakerMap.get(robotTracker.getDistanceFromSpeaker(shotPose)) + offset);
PivotConstants.feedmap.get(robotTracker.getDistanceFromSpeaker(shotPose)) + offset);
final var toPose = shotPose.minus(pose).getTranslation();
double angle =
Math.acos(toPose.getX() / toPose.getNorm())
Expand Down

0 comments on commit 21b8b78

Please sign in to comment.