Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
diff low pole, right auto
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean-Borneman committed Jun 23, 2023
1 parent a63b2bf commit c81755b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class LeftAutoTraversal extends RoadRunnerAutoBase {

Pose2d placeLocationHigh = new Pose2d(41, -26.5, Math.toRadians(45));
Pose2d placeLocationMed = new Pose2d(44.5, -1.5, Math.toRadians(50));
Pose2d placeLocationLow = new Pose2d(44.5, 6, Math.toRadians(90));
Pose2d placeLocationLow = new Pose2d(23.5, 6, Math.toRadians(225));

Pose2d intermediatePosition1 = new Pose2d(53.5,5, Math.toRadians(90));
Pose2d intermediatePosition2 = new Pose2d(53, -20, Math.toRadians(45));
Expand Down Expand Up @@ -82,15 +82,16 @@ public double get(double v, @NonNull Pose2d pose2d, @NonNull Pose2d pose2d1, @No

//Puts the arm in placing position
.addTemporalMarkerOffset(0, () -> {
claw.setPos(RobotConfig.Presets.WristPickup);
arm.toPosition(RobotConfig.Presets.Arm1Low);
slides.setTargetPosition(RobotConfig.Presets.SlidesLow);
claw.setPos(0.3383);
arm.toPosition(195);
//slides.setTargetPosition(Ro);
})
//A LOW CONE DROP !!!!!!!!!!!!!!!!!!
//.splineToLinearHeading(intermediatePosition4, 0)
.lineToLinearHeading(placeLocationLow)
//.splineToSplineHeading(placeLocationLow, 0)
//.splineToLinearHeading(placeLocationLow, 20)
//.lineToLinearHeading(placeLocationLow)
//.splineToSplreineHeading(placeLocationLow, 0)
//.splineTo(placeLocationLow)
.splineTo(new Vector2d(placeLocationLow.getX(), placeLocationLow.getY()), placeLocationLow.getHeading())

.addTemporalMarkerOffset(0, () -> {
claw.ungrab();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public class RightAutoTraversal extends RoadRunnerAutoBase {

Pose2d placeLocationHigh = new Pose2d(41, 26.5, Math.toRadians(315));
Pose2d placeLocationMed = new Pose2d(43.5, 2.5, Math.toRadians(310));
Pose2d placeLocationLow = new Pose2d(44.5, -6, Math.toRadians(270));
Pose2d placeLocationLow = new Pose2d(27.5, -4.5, 5.6);

Pose2d intermediatePosition1 = new Pose2d(53,-8, Math.toRadians(270));
Pose2d intermediatePosition1 = new Pose2d(53,-6, Math.toRadians(270));
Pose2d intermediatePosition2 = new Pose2d(52, 18.5, Math.toRadians(315));
Pose2d intermediatePosition3 = new Pose2d(48, 15, Math.toRadians(270));

Expand Down Expand Up @@ -81,9 +81,9 @@ public double get(double v, @NonNull Pose2d pose2d, @NonNull Pose2d pose2d1, @No

//Puts the arm in placing position
.addTemporalMarkerOffset(0, () -> {
claw.setPos(RobotConfig.Presets.WristPickup);
arm.toPosition(RobotConfig.Presets.Arm1Low);
slides.setTargetPosition(RobotConfig.Presets.SlidesLow);
claw.setPos(0.3383);
arm.toPosition(230);
//slides.setTargetPosition(Ro);
})
//A LOW CONE DROP !!!!!!!!!!!!!!!!!!

Expand All @@ -96,7 +96,7 @@ public double get(double v, @NonNull Pose2d pose2d, @NonNull Pose2d pose2d1, @No
//A MEDIUM CONE PICKUP !!!!!!!!!!!!!!!
//Go to pickup a cone

.addTemporalMarkerOffset(0.35, () -> {
.addTemporalMarkerOffset(1.1, () -> {
slides.setTargetPosition(RobotConfig.Presets.SlidesPickupTop);
arm.toPosition(RobotConfig.Presets.Arm1PickupTop);
claw.setPos(RobotConfig.Presets.WristPickup);
Expand Down

0 comments on commit c81755b

Please sign in to comment.