From 12aa68574f449eb62fcb5cd962312b27b055f676 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Wed, 15 Feb 2023 17:24:38 -0500 Subject: [PATCH 1/6] hello there --- .../java/frc/robot/commands/limelight.java | 32 --------------- .../java/frc/robot/subsystems/Limelight.java | 20 ++++++++- vendordeps/photonlib.json | 41 +++++++++++++++++++ 3 files changed, 60 insertions(+), 33 deletions(-) delete mode 100644 src/main/java/frc/robot/commands/limelight.java create mode 100644 vendordeps/photonlib.json diff --git a/src/main/java/frc/robot/commands/limelight.java b/src/main/java/frc/robot/commands/limelight.java deleted file mode 100644 index 3853a09..0000000 --- a/src/main/java/frc/robot/commands/limelight.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. - -package frc.robot.commands; - -import edu.wpi.first.wpilibj2.command.CommandBase; - -public class limelight extends CommandBase { - /** Creates a new limelight. */ - public limelight() { - // Use addRequirements() here to declare subsystem dependencies. - } - - // Called when the command is initially scheduled. - @Override - public void initialize() {} - - // Called every time the scheduler runs while the command is scheduled. - @Override - public void execute() {} - - // Called once the command ends or is interrupted. - @Override - public void end(boolean interrupted) {} - - // Returns true when the command should end. - @Override - public boolean isFinished() { - return false; - } -} diff --git a/src/main/java/frc/robot/subsystems/Limelight.java b/src/main/java/frc/robot/subsystems/Limelight.java index befd637..64708e0 100644 --- a/src/main/java/frc/robot/subsystems/Limelight.java +++ b/src/main/java/frc/robot/subsystems/Limelight.java @@ -4,11 +4,29 @@ package frc.robot.subsystems; +import org.photonvision.PhotonCamera; +import org.photonvision.common.hardware.VisionLEDMode; + +import edu.wpi.first.net.PortForwarder; import edu.wpi.first.wpilibj2.command.SubsystemBase; + public class Limelight extends SubsystemBase { + PhotonCamera limelight = new PhotonCamera("limelight"); /** Creates a new Limelight. */ - public Limelight() {} + public Limelight() { + PortForwarder.add(5800, "photonvision.local", 5800); + } + + public void cube() { + limelight.setLED(VisionLEDMode.kOff); + limelight.setPipelineIndex(3); + } + + public void Cone() { + limelight.setLED(VisionLEDMode.kOff); + limelight.setPipelineIndex(2); + } @Override public void periodic() { diff --git a/vendordeps/photonlib.json b/vendordeps/photonlib.json new file mode 100644 index 0000000..4f378c4 --- /dev/null +++ b/vendordeps/photonlib.json @@ -0,0 +1,41 @@ +{ + "fileName": "photonlib.json", + "name": "photonlib", + "version": "v2023.3.0", + "uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004 ", + "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", + "jniDependencies": [], + "cppDependencies": [ + { + "groupId": "org.photonvision", + "artifactId": "PhotonLib-cpp", + "version": "v2023.3.0", + "libName": "Photon", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxathena", + "linuxx86-64", + "osxuniversal" + ] + } + ], + "javaDependencies": [ + { + "groupId": "org.photonvision", + "artifactId": "PhotonLib-java", + "version": "v2023.3.0" + }, + { + "groupId": "org.photonvision", + "artifactId": "PhotonTargeting-java", + "version": "v2023.3.0" + } + ] +} \ No newline at end of file From a16c2413d87e4b8554b2cc496b4f28320ffc56b7 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 15 Feb 2023 18:03:47 -0500 Subject: [PATCH 2/6] vcgh --- src/main/java/frc/robot/RobotContainer.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index de2c9d0..9cafd77 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -6,6 +6,25 @@ package frc.robot; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; +import frc.robot.subsystems.BasePilotable; +import frc.robot.subsystems.Gratte; +import frc.robot.commands.limelight; +import frc.robot.subsystems.bras.BrasTelescopique; +import frc.robot.subsystems.bras.Pince; +import frc.robot.subsystems.bras.Pivot; +import frc.robot.commands.BrakeFerme; +import frc.robot.commands.BrakeOuvre; +import frc.robot.commands.GratteBaisser; +import frc.robot.commands.GratteMonte; +import frc.robot.commands.Gyro; +import frc.robot.commands.bras.FermePince; +import frc.robot.commands.bras.OuvrePince; +import frc.robot.commands.bras.PivotBrasRentre; +import frc.robot.commands.bras.PivoteBrasBas; +import frc.robot.commands.bras.PivoteBrasHaut; +import frc.robot.commands.bras.PivoteBrasMilieux; + + public class RobotContainer { public RobotContainer() { From 2a2cf91fe6f4c2795093cee4d06f82fea57661b4 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 15 Feb 2023 18:06:19 -0500 Subject: [PATCH 3/6] xzcvb --- src/main/java/frc/robot/RobotContainer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 9cafd77..cccb81d 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -6,12 +6,14 @@ package frc.robot; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; +//subsystems import frc.robot.subsystems.BasePilotable; import frc.robot.subsystems.Gratte; -import frc.robot.commands.limelight; import frc.robot.subsystems.bras.BrasTelescopique; import frc.robot.subsystems.bras.Pince; import frc.robot.subsystems.bras.Pivot; +import frc.robot.subsystems.Limelight; +// command import frc.robot.commands.BrakeFerme; import frc.robot.commands.BrakeOuvre; import frc.robot.commands.GratteBaisser; @@ -24,8 +26,6 @@ import frc.robot.commands.bras.PivoteBrasBas; import frc.robot.commands.bras.PivoteBrasHaut; import frc.robot.commands.bras.PivoteBrasMilieux; - - public class RobotContainer { public RobotContainer() { configureBindings(); From 89c650e57c61e7159e1c09127d42bb6b4bfb309a Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 15 Feb 2023 18:20:54 -0500 Subject: [PATCH 4/6] zdgxfhml,; --- src/main/java/frc/robot/RobotContainer.java | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index cccb81d..71542a8 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -4,6 +4,7 @@ package frc.robot; +import edu.wpi.first.wpilibj.XboxController; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; //subsystems @@ -27,7 +28,29 @@ import frc.robot.commands.bras.PivoteBrasHaut; import frc.robot.commands.bras.PivoteBrasMilieux; public class RobotContainer { - public RobotContainer() { +XboxController manette1 = new XboxController(0); +XboxController manette2 = new XboxController(1); +// subsystems +BasePilotable basePilotable = new BasePilotable(); +Gratte gratte = new Gratte(); +BrasTelescopique brasTelescopique = new BrasTelescopique(); +Pince pince = new Pince(); +Pivot pivot = new Pivot(); +Limelight limelight = new Limelight(); +//commands +BrakeFerme brakeFerme = new BrakeFerme(basePilotable); +BrakeOuvre brakeOuvre = new BrakeOuvre(basePilotable); +GratteBaisser gratteBaisser = new GratteBaisser(gratte); +GratteMonte gratteMonte = new GratteMonte(gratte); +Gyro gyro = new Gyro(basePilotable); +FermePince fermePince = new FermePince(pince); +OuvrePince ouvrePince = new OuvrePince(pince); +PivotBrasRentre pivotBrasRentre = new PivotBrasRentre(brasTelescopique, pivot); +PivoteBrasBas pivoteBrasBas = new PivoteBrasBas(brasTelescopique, pivot); +PivoteBrasMilieux pivoteBrasMilieux = new PivoteBrasMilieux(brasTelescopique, pivot); +PivoteBrasHaut pivoteBrasHaut = new PivoteBrasHaut(brasTelescopique, pivot); + +public RobotContainer() { configureBindings(); } From af77d6e4a4b5fe2e6136b83b4071833f57898632 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Wed, 15 Feb 2023 18:23:38 -0500 Subject: [PATCH 5/6] niga --- src/main/java/frc/robot/subsystems/Limelight.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/Limelight.java b/src/main/java/frc/robot/subsystems/Limelight.java index 64708e0..ac1d815 100644 --- a/src/main/java/frc/robot/subsystems/Limelight.java +++ b/src/main/java/frc/robot/subsystems/Limelight.java @@ -23,11 +23,21 @@ public class Limelight extends SubsystemBase { limelight.setPipelineIndex(3); } - public void Cone() { + public void cone() { limelight.setLED(VisionLEDMode.kOff); limelight.setPipelineIndex(2); } + public void apriltag() { + limelight.setLED(VisionLEDMode.kOff); + limelight.setPipelineIndex(0); + } + + public void tape() { + limelight.setLED(VisionLEDMode.kOn); + limelight.setPipelineIndex(1); + } + @Override public void periodic() { // This method will be called once per scheduler run From eed8f171e17d562f21f59ff03ac0c4ae0e65f58f Mon Sep 17 00:00:00 2001 From: Olivier Demers Date: Wed, 15 Feb 2023 23:26:45 +0000 Subject: [PATCH 6/6] Removed bin folder --- bin/main/frc/robot/commands/BrakeFerme.class | Bin 982 -> 0 bytes bin/main/frc/robot/commands/BrakeOuvre.class | Bin 982 -> 0 bytes .../frc/robot/subsystems/BasePilotable.class | Bin 3529 -> 0 bytes 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bin/main/frc/robot/commands/BrakeFerme.class delete mode 100644 bin/main/frc/robot/commands/BrakeOuvre.class delete mode 100644 bin/main/frc/robot/subsystems/BasePilotable.class diff --git a/bin/main/frc/robot/commands/BrakeFerme.class b/bin/main/frc/robot/commands/BrakeFerme.class deleted file mode 100644 index 9911767ccb6bbbfedefdcca16f36a0596a4e226b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 982 zcma)5T~E|d5IuKWD3q=Xiz2A_0V-wJ(8NT2!1w^kK5dL~%_ibgyS;=9+ZJzIzkZW1 zCW?uP{s4cJai-nfZlVc1bb4p*oO9-*{r%_1F91*ATBr%EAL@aplOV~wK@vrN9H!o$ z_D^I->PT8J1zIx9z4xceJ5)N&_%u|(@xyVxw_oD+{8S3m1A4ts!zA;AA^CT^l|Y&Y z>Blsa5lKvE?F!63Rk6yR32eC+0c`gL%>5*kHViB{u;2(7?sk730+$@jVAjH-fO}5q zy>Uf0;hGMXaao|@hv7^4Hdk6kGR{(g9rsQ5qD;G7TcfLD`8RKSuSHrlUnDenWUgNV9~Tgy6F)IXt*5eCAl8Rj^foeD%PE2|DBIJG(>~GErA+u zfKD@XwlGI_p1eN!HF~eKzQb;{zoFhTf1>f)X!p*r^o4F}xI(rGlWc?RBH@}8TgD3G zN;Ixwl|1%Yg^I-*oRP-k!UyJBUr|59wTjg)(5qC>TEWH$${VrK7A72Riu0YQz$^nw z;WA2~m;i4VjdO#K=-~$c0d5w+vi>oUH8!wGmi`jlBg+&I3ZH0<&jlIJqZD_i#A_4r I`$g8)U&kBAQUCw| diff --git a/bin/main/frc/robot/commands/BrakeOuvre.class b/bin/main/frc/robot/commands/BrakeOuvre.class deleted file mode 100644 index 17058de63c61796f1ae924b9f1c2052704f4c714..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 982 zcma)5+fLL_6kTUJP$(S>gCeMS0hH1)G%-;hFg`%S(?pG9CJ~?7=^-4Pws_j&<(qsl zQA|wq1NCx4?o7RZV) z`sU2$LtyRv$=bNdld;Ad6)@!o*(-9|jUkhW z=I9=9$#W{nrPjqsE-5GuSTx%w-Ry`1G+YjK(n9y-zT(w7W7h5C;55J;8lpkpmOza+ zK&L4>o0uUxOJ0}!8oigi@36eqH#EHZPdKlQR_6>0U+AWWD`cCflXb|>6Rt_IMJzF{ zLgOly$zz{Ys93DP9%wu&ePG7>ipCkPjajV{y-fA2lx&Qkya5|+VZ_m*INymem}NjI zTt)>HBjD|_ac=M-J>1|w!1WSX)jtHX#v0bi(qDqRWSQcA=@X6dxg_IxRO0T0cx@zp Iugu!~3ji<2+5i9m diff --git a/bin/main/frc/robot/subsystems/BasePilotable.class b/bin/main/frc/robot/subsystems/BasePilotable.class deleted file mode 100644 index a2332e150d55ae79549ace7f41302a982571b46e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3529 zcmbVO=~vWN6#oT~afYZ=Ma8{}I^Yr&6e-%O!y>1HQa~)y#Y`qZASBZy18VJR?QZR6 z_uYQ)DW|}(J?)2n)c>iczn5fY5NF&tOzwL(@9w{QUvB;P=RW|N@oNNS61EIGn&Q|g z+f&?Z%Dv!v`h=?-S6#iwFl|pwnR)~j5_ak7tTL4`lwrehJ+U&4)YyJSvnM80E3Ne9 zgoUVtm^!IiUfQt@Pr`;IPbrQ*>Dw_hS4kW@*_TnB@ox2etAr~5@Q9k#Mky+*j$`PK z9ttlBx4GAgLVioKs7K0#?b(iITb^T^O1Ib~f{m#=osON&&|u{}WyU0JDkYSq9lloD zjNxHAWO;^awh0bZ#8Qqrp7U{g3Gp^N%l!4(rf%6rT14tg<*Y|XE;zQU*%^8eP2QF8H!?y1&@$)n}*`Zfs_2|KMvAz_V-PX%nEPRa3$0w?+=&I*^J?7 zqr$5?8QZWuFxn%Segqw?LcFc5tA0SlP%mQ%md3CXyCc{oVR!M`mMDjeJx~OU98FE@ zeuX3~qW1a$S~=gB(e<?Ni>!?w6L`0JuyX~Sh|H9winG8UmSh8DC&@I;u* z63CTt7)OW%R;Jz3SPe(Q)_DD0VDHsUnw-?bL# zMI3G)NE)ej$FUt2Gj?1c{Zw|+@iWvXV;QQWIE^zAFux7OOLZso>jqRatIK#6gG~5% zhwV(M4r{XOff^@}ZjE6G&qweaVfY|6WxRkF8NZ(eCH^p$0#K?l9z%650Uf$C!33N} zT818k(W_7Dj+l0phYic{o{XU!qcVn(jA9IC1mhA`6dHzeNC3@q1;(19u#kzsCfFCE zVBU00+EYndG3)$E)_);SCYen-a`Y#lDyI)}ayz zxu;Nol(%HWP$e4jZ5cAE#2|ZDIP;!_@keszQGNLUS0nhaWLNfBdUk@tNOQaGbe7ZI z2h>NnCLxmO?``i%beC?*V#2Kg0H27F&?MUPGZFOX684n}x~PsW{}vd-7oy>)XDxVf zT*B8fzQMP_#OkuxYMvP574frTtS`>!j$x+_jjhmUXB|!NF#Ox=j!&08WBjz>Cqw$64fZ4%ir~#ZAFgwHU@e zyBudij|w~CQeh{23U`GZtzxXeZkBux)QBPvg4JJ4fEy!8v?6gVjQ~ zVisQ&QgM(t0$K^r6$I-_BB_SxS%ni=jTF{!IMw1B*5L+AJI9vzm!E>SaAaP}Zs+Up wT`pz36hx2mS1=Sbb7G#L6bhE%dmb&r5BQOEIad~b!Y@Z_`3W+F8%JyZ2Obe~2><{9