Compare commits
53 Commits
813a0976ad
...
coaching
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ecaef3d1d | |||
| f7e88619e9 | |||
| 5c626f33e3 | |||
|
|
673a7fcb82 | ||
|
|
755d79aa18 | ||
|
|
799e3e34c3 | ||
|
|
fbd94fc33d | ||
|
|
9e3bd6e7d3 | ||
|
|
bd853dfc79 | ||
|
|
cb3104152c | ||
|
|
85da1dcad1 | ||
|
|
a92a7a0ea1 | ||
|
|
ba57959f4d | ||
|
|
79568a58b9 | ||
|
|
57fa3597e2 | ||
|
|
5ba5cce953 | ||
|
|
d0c50cbd6e | ||
|
|
0492c9a2c6 | ||
|
|
69fe4a58d0 | ||
|
|
92b876e7b0 | ||
|
|
22746ab8ca | ||
|
|
70b796e99a | ||
|
|
083288d3fc | ||
|
|
b83e689b97 | ||
|
|
33fd6ceb23 | ||
|
|
36a6bf2ab0 | ||
|
|
9249751f2b | ||
|
|
2c0bab873c | ||
|
|
2e7f9a6aa9 | ||
|
|
7f0f957ad1 | ||
|
|
7d2b2ea139 | ||
|
|
a7fb3108ea | ||
|
|
e0c1e26933 | ||
|
|
97387630aa | ||
|
|
bd79b249e9 | ||
|
|
e919daab88 | ||
|
|
873095e865 | ||
|
|
a142290bd5 | ||
|
|
d73da286ed | ||
|
|
e42464b1d6 | ||
|
|
d04817a197 | ||
|
|
a45e81349a | ||
|
|
d1f4e11cfb | ||
|
|
c0a2c67261 | ||
|
|
d81ff3db3d | ||
|
|
fb0ca84885 | ||
|
|
463b8b31a4 | ||
|
|
9fd713ba18 | ||
|
|
8dfcd65405 | ||
|
|
404afdbef5 | ||
|
|
11f6bae2e5 | ||
|
|
8c6a6db6a4 | ||
|
|
b9cac9ee36 |
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -56,5 +56,6 @@
|
|||||||
"edu.wpi.first.math.proto.*",
|
"edu.wpi.first.math.proto.*",
|
||||||
"edu.wpi.first.math.**.proto.*",
|
"edu.wpi.first.math.**.proto.*",
|
||||||
"edu.wpi.first.math.**.struct.*",
|
"edu.wpi.first.math.**.struct.*",
|
||||||
]
|
],
|
||||||
|
"java.dependency.enableDependencyCheckup": false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"enableCppIntellisense": false,
|
"enableCppIntellisense": false,
|
||||||
"currentLanguage": "java",
|
"currentLanguage": "java",
|
||||||
"projectYear": "2025",
|
"projectYear": "2026",
|
||||||
"teamNumber": 5618
|
"teamNumber": 5618
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2009-2024 FIRST and other WPILib contributors
|
Copyright (c) 2009-2026 FIRST and other WPILib contributors
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|||||||
11
build.gradle
11
build.gradle
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "java"
|
id "java"
|
||||||
id "edu.wpi.first.GradleRIO" version "2025.3.2"
|
id "edu.wpi.first.GradleRIO" version "2026.2.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
@@ -33,7 +33,7 @@ deploy {
|
|||||||
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
||||||
files = project.fileTree('src/main/deploy')
|
files = project.fileTree('src/main/deploy')
|
||||||
directory = '/home/lvuser/deploy'
|
directory = '/home/lvuser/deploy'
|
||||||
deleteOldFiles = false // Change to true to delete files on roboRIO that no
|
deleteOldFiles = true // Change to true to delete files on roboRIO that no
|
||||||
// longer exist in deploy directory of this project
|
// longer exist in deploy directory of this project
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,8 @@ deploy {
|
|||||||
|
|
||||||
def deployArtifact = deploy.targets.roborio.artifacts.frcJava
|
def deployArtifact = deploy.targets.roborio.artifacts.frcJava
|
||||||
|
|
||||||
// Set to true to use debug for JNI.
|
// Set to true to use debug for all targets including JNI, which will drastically impact
|
||||||
|
// performance.
|
||||||
wpi.java.debugJni = false
|
wpi.java.debugJni = false
|
||||||
|
|
||||||
// Set this to true to enable desktop support.
|
// Set this to true to enable desktop support.
|
||||||
@@ -88,7 +89,9 @@ wpi.sim.addDriverstation()
|
|||||||
// knows where to look for our Robot Class.
|
// knows where to look for our Robot Class.
|
||||||
jar {
|
jar {
|
||||||
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||||
from sourceSets.main.allSource
|
from('src') { into 'backup/src' }
|
||||||
|
from('vendordeps') { into 'backup/vendordeps' }
|
||||||
|
from('build.gradle') { into 'backup' }
|
||||||
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
|
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
|
||||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ pluginManagement {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
String frcYear = '2025'
|
String frcYear = '2026'
|
||||||
File frcHome
|
File frcHome
|
||||||
if (OperatingSystem.current().isWindows()) {
|
if (OperatingSystem.current().isWindows()) {
|
||||||
String publicFolder = System.getenv('PUBLIC')
|
String publicFolder = System.getenv('PUBLIC')
|
||||||
|
|||||||
31
src/main/deploy/pathplanner/autos/Copy of TirSimple.auto
Normal file
31
src/main/deploy/pathplanner/autos/Copy of TirSimple.auto
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"command": {
|
||||||
|
"type": "sequential",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "TirerSimple"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreBalayeuse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Lancer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resetOdom": true,
|
||||||
|
"folder": null,
|
||||||
|
"choreoAuto": false
|
||||||
|
}
|
||||||
@@ -4,6 +4,12 @@
|
|||||||
"type": "sequential",
|
"type": "sequential",
|
||||||
"data": {
|
"data": {
|
||||||
"commands": [
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreBalayeuse"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "deadline",
|
"type": "deadline",
|
||||||
"data": {
|
"data": {
|
||||||
@@ -17,7 +23,7 @@
|
|||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Aspirer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -32,13 +38,13 @@
|
|||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Limelighter"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Lancer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
"type": "sequential",
|
"type": "sequential",
|
||||||
"data": {
|
"data": {
|
||||||
"commands": [
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreBalayeuse"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "deadline",
|
"type": "deadline",
|
||||||
"data": {
|
"data": {
|
||||||
@@ -17,7 +23,7 @@
|
|||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Aspirer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -32,19 +38,19 @@
|
|||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Limelighter"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Lancer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "TournerA180"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -56,13 +62,25 @@
|
|||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "GrimperMur"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "MonterGrimpeur"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "MonterMur"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreGrimpeur"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
"type": "sequential",
|
"type": "sequential",
|
||||||
"data": {
|
"data": {
|
||||||
"commands": [
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreBalayeuse"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "deadline",
|
"type": "deadline",
|
||||||
"data": {
|
"data": {
|
||||||
@@ -17,7 +23,7 @@
|
|||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Aspirer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -32,19 +38,19 @@
|
|||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Limelighter"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Lancer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "TournerAZero"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -56,13 +62,25 @@
|
|||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "GrimperReservoir"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "MonterGrimpeur"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "MonterReservoir"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreGrimpeur"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
56
src/main/deploy/pathplanner/autos/MilieuDroite.auto
Normal file
56
src/main/deploy/pathplanner/autos/MilieuDroite.auto
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"command": {
|
||||||
|
"type": "sequential",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreBalayeuse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "deadline",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "ChercherMilieuDroite"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Aspirer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "RetourMilieuDroite"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Limelighter"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Lancer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resetOdom": true,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"choreoAuto": false
|
||||||
|
}
|
||||||
62
src/main/deploy/pathplanner/autos/MilieuDroiteProche.auto
Normal file
62
src/main/deploy/pathplanner/autos/MilieuDroiteProche.auto
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"command": {
|
||||||
|
"type": "sequential",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreBalayeuse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "deadline",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "ChercherMilieuDroiteProche"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Aspirer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "PartirMilieuDroiteProche"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "RetourMilieuDroite"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Limelighter"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Lancer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resetOdom": true,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"choreoAuto": false
|
||||||
|
}
|
||||||
56
src/main/deploy/pathplanner/autos/MilieuGauche.auto
Normal file
56
src/main/deploy/pathplanner/autos/MilieuGauche.auto
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"command": {
|
||||||
|
"type": "sequential",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreBalayeuse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "deadline",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "ChercherMilieuGauche"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Aspirer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "RetourMilieuGauche"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Limelighter"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Lancer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resetOdom": true,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"choreoAuto": false
|
||||||
|
}
|
||||||
62
src/main/deploy/pathplanner/autos/MilieuGaucheProche.auto
Normal file
62
src/main/deploy/pathplanner/autos/MilieuGaucheProche.auto
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"command": {
|
||||||
|
"type": "sequential",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "DescendreBalayeuse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "deadline",
|
||||||
|
"data": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "ChercherMilieuGaucheProche"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Aspirer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"data": {
|
||||||
|
"pathName": "PartirMilieuGaucheProche"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "RetourMilieuGauche"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Limelighter"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Lancer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resetOdom": true,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"choreoAuto": false
|
||||||
|
}
|
||||||
@@ -13,13 +13,19 @@
|
|||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "DescendreBalayeuse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "named",
|
"type": "named",
|
||||||
"data": {
|
"data": {
|
||||||
"name": null
|
"name": "Limelighter"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "named",
|
||||||
|
"data": {
|
||||||
|
"name": "Lancer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
75
src/main/deploy/pathplanner/paths/ChercherMilieuDroite.path
Normal file
75
src/main/deploy/pathplanner/paths/ChercherMilieuDroite.path
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"waypoints": [
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 4.026,
|
||||||
|
"y": 0.685
|
||||||
|
},
|
||||||
|
"prevControl": null,
|
||||||
|
"nextControl": {
|
||||||
|
"x": 8.399509272467903,
|
||||||
|
"y": 0.7238159771754633
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 8.295877318116975,
|
||||||
|
"y": 1.238
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 8.295877318116975,
|
||||||
|
"y": 0.48503351833476316
|
||||||
|
},
|
||||||
|
"nextControl": {
|
||||||
|
"x": 8.295877318116975,
|
||||||
|
"y": 2.0013808844507857
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 8.295877318116975,
|
||||||
|
"y": 3.322
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 8.295877318116975,
|
||||||
|
"y": 2.2023305396701525
|
||||||
|
},
|
||||||
|
"nextControl": null,
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rotationTargets": [
|
||||||
|
{
|
||||||
|
"waypointRelativePos": 0.7420042643923158,
|
||||||
|
"rotationDegrees": 90.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"constraintZones": [],
|
||||||
|
"pointTowardsZones": [],
|
||||||
|
"eventMarkers": [],
|
||||||
|
"globalConstraints": {
|
||||||
|
"maxVelocity": 3.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
},
|
||||||
|
"goalEndState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 90.0
|
||||||
|
},
|
||||||
|
"reversed": false,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"idealStartingState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 90.0
|
||||||
|
},
|
||||||
|
"useDefaultConstraints": true
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"waypoints": [
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 4.000242510699001,
|
||||||
|
"y": 0.6515406562054205
|
||||||
|
},
|
||||||
|
"prevControl": null,
|
||||||
|
"nextControl": {
|
||||||
|
"x": 5.772958630527817,
|
||||||
|
"y": 0.6310199714693305
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 6.0057346647646215,
|
||||||
|
"y": 1.2725962910128386
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 6.0057346647646215,
|
||||||
|
"y": 0.5196298093476017
|
||||||
|
},
|
||||||
|
"nextControl": {
|
||||||
|
"x": 6.0057346647646215,
|
||||||
|
"y": 2.0359771754636244
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 5.8,
|
||||||
|
"y": 3.322
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 5.8,
|
||||||
|
"y": 2.2023305396701525
|
||||||
|
},
|
||||||
|
"nextControl": null,
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rotationTargets": [
|
||||||
|
{
|
||||||
|
"waypointRelativePos": 0.7420042643923158,
|
||||||
|
"rotationDegrees": 90.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"constraintZones": [
|
||||||
|
{
|
||||||
|
"name": "Constraints Zone",
|
||||||
|
"minWaypointRelativePos": 0,
|
||||||
|
"maxWaypointRelativePos": 0.7292370020256648,
|
||||||
|
"constraints": {
|
||||||
|
"maxVelocity": 1.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pointTowardsZones": [],
|
||||||
|
"eventMarkers": [],
|
||||||
|
"globalConstraints": {
|
||||||
|
"maxVelocity": 3.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
},
|
||||||
|
"goalEndState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 90.0
|
||||||
|
},
|
||||||
|
"reversed": false,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"idealStartingState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 90.0
|
||||||
|
},
|
||||||
|
"useDefaultConstraints": true
|
||||||
|
}
|
||||||
75
src/main/deploy/pathplanner/paths/ChercherMilieuGauche.path
Normal file
75
src/main/deploy/pathplanner/paths/ChercherMilieuGauche.path
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"waypoints": [
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 4.026119828815976,
|
||||||
|
"y": 7.314950071326677
|
||||||
|
},
|
||||||
|
"prevControl": null,
|
||||||
|
"nextControl": {
|
||||||
|
"x": 8.399629101283878,
|
||||||
|
"y": 7.35376604850214
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 8.295877318116975,
|
||||||
|
"y": 6.771526390870186
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 8.295877318116975,
|
||||||
|
"y": 7.524492872535423
|
||||||
|
},
|
||||||
|
"nextControl": {
|
||||||
|
"x": 8.295877318116975,
|
||||||
|
"y": 6.0081455064194005
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 8.295877318116975,
|
||||||
|
"y": 4.688402282453637
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 8.32422939366089,
|
||||||
|
"y": 5.807712722058167
|
||||||
|
},
|
||||||
|
"nextControl": null,
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rotationTargets": [
|
||||||
|
{
|
||||||
|
"waypointRelativePos": 0.7420042643923158,
|
||||||
|
"rotationDegrees": -90.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"constraintZones": [],
|
||||||
|
"pointTowardsZones": [],
|
||||||
|
"eventMarkers": [],
|
||||||
|
"globalConstraints": {
|
||||||
|
"maxVelocity": 3.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
},
|
||||||
|
"goalEndState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": -90.0
|
||||||
|
},
|
||||||
|
"reversed": false,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"idealStartingState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": -90.0
|
||||||
|
},
|
||||||
|
"useDefaultConstraints": true
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"waypoints": [
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 4.064935805991441,
|
||||||
|
"y": 7.392582025677603
|
||||||
|
},
|
||||||
|
"prevControl": null,
|
||||||
|
"nextControl": {
|
||||||
|
"x": 5.617574893009986,
|
||||||
|
"y": 7.314950071326676
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 5.915164051355206,
|
||||||
|
"y": 6.758587731811698
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 5.915164051355206,
|
||||||
|
"y": 7.511554213476935
|
||||||
|
},
|
||||||
|
"nextControl": {
|
||||||
|
"x": 5.915164051355206,
|
||||||
|
"y": 5.995206847360913
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 5.8,
|
||||||
|
"y": 4.688402282453637
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 5.828352075543914,
|
||||||
|
"y": 5.807712722058167
|
||||||
|
},
|
||||||
|
"nextControl": null,
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rotationTargets": [
|
||||||
|
{
|
||||||
|
"waypointRelativePos": 0.7420042643923158,
|
||||||
|
"rotationDegrees": -90.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"constraintZones": [
|
||||||
|
{
|
||||||
|
"name": "Constraints Zone",
|
||||||
|
"minWaypointRelativePos": 0.0,
|
||||||
|
"maxWaypointRelativePos": 0.8426738690074239,
|
||||||
|
"constraints": {
|
||||||
|
"maxVelocity": 1.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pointTowardsZones": [],
|
||||||
|
"eventMarkers": [],
|
||||||
|
"globalConstraints": {
|
||||||
|
"maxVelocity": 3.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
},
|
||||||
|
"goalEndState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": -90.0
|
||||||
|
},
|
||||||
|
"reversed": false,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"idealStartingState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": -90.0
|
||||||
|
},
|
||||||
|
"useDefaultConstraints": true
|
||||||
|
}
|
||||||
@@ -3,12 +3,12 @@
|
|||||||
"waypoints": [
|
"waypoints": [
|
||||||
{
|
{
|
||||||
"anchor": {
|
"anchor": {
|
||||||
"x": 3.5732667617689007,
|
"x": 3.6120827389443653,
|
||||||
"y": 5.917574893009986
|
"y": 5.917574893009986
|
||||||
},
|
},
|
||||||
"prevControl": null,
|
"prevControl": null,
|
||||||
"nextControl": {
|
"nextControl": {
|
||||||
"x": 2.266462196861626,
|
"x": 2.3052781740370905,
|
||||||
"y": 5.904636233951498
|
"y": 5.904636233951498
|
||||||
},
|
},
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
@@ -16,11 +16,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"anchor": {
|
"anchor": {
|
||||||
"x": 1.1796148359486442,
|
"x": 0.4938659058487873,
|
||||||
"y": 5.917574893009986
|
"y": 5.917574893009986
|
||||||
},
|
},
|
||||||
"prevControl": {
|
"prevControl": {
|
||||||
"x": 1.7230385164051354,
|
"x": 1.0372895863052785,
|
||||||
"y": 5.930513552068473
|
"y": 5.930513552068473
|
||||||
},
|
},
|
||||||
"nextControl": null,
|
"nextControl": null,
|
||||||
|
|||||||
54
src/main/deploy/pathplanner/paths/MonterMur.path
Normal file
54
src/main/deploy/pathplanner/paths/MonterMur.path
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"waypoints": [
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 1.0761055634807417,
|
||||||
|
"y": 4.85660485021398
|
||||||
|
},
|
||||||
|
"prevControl": null,
|
||||||
|
"nextControl": {
|
||||||
|
"x": 0.8292699165532256,
|
||||||
|
"y": 4.81695433438033
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 1.0761055634807417,
|
||||||
|
"y": 4.623708987161199
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 1.3604504533921022,
|
||||||
|
"y": 4.6356950204744996
|
||||||
|
},
|
||||||
|
"nextControl": null,
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rotationTargets": [],
|
||||||
|
"constraintZones": [],
|
||||||
|
"pointTowardsZones": [],
|
||||||
|
"eventMarkers": [],
|
||||||
|
"globalConstraints": {
|
||||||
|
"maxVelocity": 3.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
},
|
||||||
|
"goalEndState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 180.0
|
||||||
|
},
|
||||||
|
"reversed": false,
|
||||||
|
"folder": null,
|
||||||
|
"idealStartingState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 180.0
|
||||||
|
},
|
||||||
|
"useDefaultConstraints": true
|
||||||
|
}
|
||||||
54
src/main/deploy/pathplanner/paths/MonterReservoir.path
Normal file
54
src/main/deploy/pathplanner/paths/MonterReservoir.path
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"waypoints": [
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 1.0502282453637657,
|
||||||
|
"y": 2.4758915834522113
|
||||||
|
},
|
||||||
|
"prevControl": null,
|
||||||
|
"nextControl": {
|
||||||
|
"x": 1.0408884389937225,
|
||||||
|
"y": 2.742159765250622
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 1.0502282453637657,
|
||||||
|
"y": 2.7734807417974334
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 1.0547546338516156,
|
||||||
|
"y": 2.523521721541598
|
||||||
|
},
|
||||||
|
"nextControl": null,
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rotationTargets": [],
|
||||||
|
"constraintZones": [],
|
||||||
|
"pointTowardsZones": [],
|
||||||
|
"eventMarkers": [],
|
||||||
|
"globalConstraints": {
|
||||||
|
"maxVelocity": 3.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
},
|
||||||
|
"goalEndState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 0.0
|
||||||
|
},
|
||||||
|
"reversed": false,
|
||||||
|
"folder": null,
|
||||||
|
"idealStartingState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 0.0
|
||||||
|
},
|
||||||
|
"useDefaultConstraints": true
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"waypoints": [
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 5.8,
|
||||||
|
"y": 3.322
|
||||||
|
},
|
||||||
|
"prevControl": null,
|
||||||
|
"nextControl": {
|
||||||
|
"x": 6.486128029253273,
|
||||||
|
"y": 1.6749552651197097
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 6.820870185449357,
|
||||||
|
"y": 0.8714978601997154
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 6.300963707518119,
|
||||||
|
"y": 2.122306196505451
|
||||||
|
},
|
||||||
|
"nextControl": null,
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rotationTargets": [],
|
||||||
|
"constraintZones": [],
|
||||||
|
"pointTowardsZones": [],
|
||||||
|
"eventMarkers": [],
|
||||||
|
"globalConstraints": {
|
||||||
|
"maxVelocity": 3.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
},
|
||||||
|
"goalEndState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 180.0
|
||||||
|
},
|
||||||
|
"reversed": false,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"idealStartingState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 90.0
|
||||||
|
},
|
||||||
|
"useDefaultConstraints": true
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"version": "2025.0",
|
||||||
|
"waypoints": [
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 5.8,
|
||||||
|
"y": 4.688402282453637
|
||||||
|
},
|
||||||
|
"prevControl": null,
|
||||||
|
"nextControl": {
|
||||||
|
"x": 6.22710768166824,
|
||||||
|
"y": 6.07993837753099
|
||||||
|
},
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anchor": {
|
||||||
|
"x": 6.963195435092723,
|
||||||
|
"y": 6.913851640513553
|
||||||
|
},
|
||||||
|
"prevControl": {
|
||||||
|
"x": 6.833040037863721,
|
||||||
|
"y": 6.563509208473397
|
||||||
|
},
|
||||||
|
"nextControl": null,
|
||||||
|
"isLocked": false,
|
||||||
|
"linkedName": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rotationTargets": [],
|
||||||
|
"constraintZones": [],
|
||||||
|
"pointTowardsZones": [],
|
||||||
|
"eventMarkers": [],
|
||||||
|
"globalConstraints": {
|
||||||
|
"maxVelocity": 3.0,
|
||||||
|
"maxAcceleration": 3.0,
|
||||||
|
"maxAngularVelocity": 540.0,
|
||||||
|
"maxAngularAcceleration": 720.0,
|
||||||
|
"nominalVoltage": 12.0,
|
||||||
|
"unlimited": false
|
||||||
|
},
|
||||||
|
"goalEndState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": 180.0
|
||||||
|
},
|
||||||
|
"reversed": false,
|
||||||
|
"folder": "Milieu",
|
||||||
|
"idealStartingState": {
|
||||||
|
"velocity": 0,
|
||||||
|
"rotation": -90.0
|
||||||
|
},
|
||||||
|
"useDefaultConstraints": true
|
||||||
|
}
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
"waypoints": [
|
"waypoints": [
|
||||||
{
|
{
|
||||||
"anchor": {
|
"anchor": {
|
||||||
"x": 1.1796148359486442,
|
"x": 0.5197432239657629,
|
||||||
"y": 5.917574893009986
|
"y": 5.930513552068473
|
||||||
},
|
},
|
||||||
"prevControl": null,
|
"prevControl": null,
|
||||||
"nextControl": {
|
"nextControl": {
|
||||||
"x": 2.3570328102710407,
|
"x": 1.6971611982881594,
|
||||||
"y": 5.982268188302426
|
"y": 5.995206847360913
|
||||||
},
|
},
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"linkedName": null
|
"linkedName": null
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
],
|
],
|
||||||
"rotationTargets": [
|
"rotationTargets": [
|
||||||
{
|
{
|
||||||
"waypointRelativePos": 0.2179128348660559,
|
"waypointRelativePos": 0.3240938166311289,
|
||||||
"rotationDegrees": 180.0
|
"rotationDegrees": 180.0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
"waypoints": [
|
"waypoints": [
|
||||||
{
|
{
|
||||||
"anchor": {
|
"anchor": {
|
||||||
"x": 3.5473894436519258,
|
"x": 3.602,
|
||||||
"y": 4.015592011412268
|
"y": 4.015592011412268
|
||||||
},
|
},
|
||||||
"prevControl": null,
|
"prevControl": null,
|
||||||
"nextControl": {
|
"nextControl": {
|
||||||
"x": 2.494897544356074,
|
"x": 2.549508100704148,
|
||||||
"y": 4.011425161481168
|
"y": 4.011425161481168
|
||||||
},
|
},
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
@@ -16,12 +16,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"anchor": {
|
"anchor": {
|
||||||
"x": 1.7359771754636228,
|
"x": 1.643730569948188,
|
||||||
"y": 4.015592011412268
|
"y": 4.015592011412268
|
||||||
},
|
},
|
||||||
"prevControl": {
|
"prevControl": {
|
||||||
"x": 2.627549770741877,
|
"x": 2.5679620034542325,
|
||||||
"y": 4.02839075681212
|
"y": 4.011502590673576
|
||||||
},
|
},
|
||||||
"nextControl": null,
|
"nextControl": null,
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"pointTowardsZones": [],
|
"pointTowardsZones": [],
|
||||||
"eventMarkers": [],
|
"eventMarkers": [],
|
||||||
"globalConstraints": {
|
"globalConstraints": {
|
||||||
"maxVelocity": 3.0,
|
"maxVelocity": 5.0,
|
||||||
"maxAcceleration": 3.0,
|
"maxAcceleration": 3.0,
|
||||||
"maxAngularVelocity": 540.0,
|
"maxAngularVelocity": 540.0,
|
||||||
"maxAngularAcceleration": 720.0,
|
"maxAngularAcceleration": 720.0,
|
||||||
@@ -50,5 +50,5 @@
|
|||||||
"velocity": 0,
|
"velocity": 0,
|
||||||
"rotation": 0.0
|
"rotation": 0.0
|
||||||
},
|
},
|
||||||
"useDefaultConstraints": true
|
"useDefaultConstraints": false
|
||||||
}
|
}
|
||||||
36
src/main/deploy/pathplanner/settings.json
Normal file
36
src/main/deploy/pathplanner/settings.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"robotWidth": 0.83,
|
||||||
|
"robotLength": 0.87,
|
||||||
|
"holonomicMode": true,
|
||||||
|
"pathFolders": [
|
||||||
|
"Milieu"
|
||||||
|
],
|
||||||
|
"autoFolders": [
|
||||||
|
"Milieu"
|
||||||
|
],
|
||||||
|
"defaultMaxVel": 3.0,
|
||||||
|
"defaultMaxAccel": 3.0,
|
||||||
|
"defaultMaxAngVel": 540.0,
|
||||||
|
"defaultMaxAngAccel": 720.0,
|
||||||
|
"defaultNominalVoltage": 12.0,
|
||||||
|
"robotMass": 51.673,
|
||||||
|
"robotMOI": 6.883,
|
||||||
|
"robotTrackwidth": 0.546,
|
||||||
|
"driveWheelRadius": 0.051,
|
||||||
|
"driveGearing": 6.2,
|
||||||
|
"maxDriveSpeed": 9.82,
|
||||||
|
"driveMotorType": "krakenX60",
|
||||||
|
"driveCurrentLimit": 120.0,
|
||||||
|
"wheelCOF": 1.2,
|
||||||
|
"flModuleX": 0.288925,
|
||||||
|
"flModuleY": 0.269875,
|
||||||
|
"frModuleX": 0.288925,
|
||||||
|
"frModuleY": -0.27,
|
||||||
|
"blModuleX": -0.288925,
|
||||||
|
"blModuleY": 0.269875,
|
||||||
|
"brModuleX": -0.288925,
|
||||||
|
"brModuleY": -0.27,
|
||||||
|
"bumperOffsetX": 0.0,
|
||||||
|
"bumperOffsetY": 0.0,
|
||||||
|
"robotFeatures": []
|
||||||
|
}
|
||||||
67
src/main/java/frc/robot/Commandes.java
Normal file
67
src/main/java/frc/robot/Commandes.java
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
package frc.robot;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Commands;
|
||||||
|
import frc.robot.subsystems.Balayeuse;
|
||||||
|
import frc.robot.subsystems.CommandSwerveDrivetrain;
|
||||||
|
import frc.robot.subsystems.Demeleur;
|
||||||
|
import frc.robot.subsystems.Grimpeur;
|
||||||
|
import frc.robot.subsystems.Lanceur;
|
||||||
|
import frc.robot.subsystems.PivotBalayeuse;
|
||||||
|
|
||||||
|
public class Commandes {
|
||||||
|
|
||||||
|
private final CommandSwerveDrivetrain drivetrain;
|
||||||
|
private final Lanceur lanceur;
|
||||||
|
private final Demeleur demeleur;
|
||||||
|
private final Balayeuse balayeuse;
|
||||||
|
private final Grimpeur grimpeur;
|
||||||
|
private final PivotBalayeuse pivotBalayeuse;
|
||||||
|
|
||||||
|
public Commandes(CommandSwerveDrivetrain drivetrain,
|
||||||
|
Lanceur lanceur,
|
||||||
|
Demeleur demeleur,
|
||||||
|
Balayeuse balayeuse,
|
||||||
|
Grimpeur grimpeur,
|
||||||
|
PivotBalayeuse pivotBalayeuse) {
|
||||||
|
this.drivetrain = drivetrain;
|
||||||
|
this.lanceur = lanceur;
|
||||||
|
this.demeleur = demeleur;
|
||||||
|
this.balayeuse = balayeuse;
|
||||||
|
this.grimpeur = grimpeur;
|
||||||
|
this.pivotBalayeuse = pivotBalayeuse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double vitesseLanceur() {
|
||||||
|
return Coordinates.diffFromHub(drivetrain.getState().Pose.getTranslation()).getNorm() * 410.57 + 2250;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command viserLancer() {
|
||||||
|
return viserLancer(() -> 0.0, () -> 0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command viserLancer(Supplier<Double> vitesseX, Supplier<Double> vitesseY) {
|
||||||
|
return Commands.parallel(
|
||||||
|
drivetrain.viserReservoir(vitesseX, vitesseY),
|
||||||
|
this.lancer());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command lancer() {
|
||||||
|
return lancer(this::vitesseLanceur);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command lancer(Supplier<Double> vitesse) {
|
||||||
|
return Commands.parallel(
|
||||||
|
lanceur.lancer(vitesse),
|
||||||
|
Commands.waitUntil(lanceur::setPointAtteint).andThen(demeleur.run()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command lancerAspirer() {
|
||||||
|
return Commands.parallel(
|
||||||
|
this.lancer(),
|
||||||
|
balayeuse.aspirer());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
41
src/main/java/frc/robot/Coordinates.java
Normal file
41
src/main/java/frc/robot/Coordinates.java
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
package frc.robot;
|
||||||
|
|
||||||
|
import static edu.wpi.first.units.Units.Meters;
|
||||||
|
|
||||||
|
import edu.wpi.first.math.geometry.Translation2d;
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation;
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation.Alliance;
|
||||||
|
|
||||||
|
public final class Coordinates {
|
||||||
|
public static final Translation2d kRedHub = new Translation2d(Meters.of(16.5 - 4.6), Meters.of(4.03));
|
||||||
|
public static final Translation2d kBlueHub = new Translation2d(Meters.of(4.6), Meters.of(4.03));
|
||||||
|
|
||||||
|
public static final Translation2d kGrimpeDepotRouge = new Translation2d(Meters.of(16.5 - 1.1), Meters.of(4.9));
|
||||||
|
public static final Translation2d kGrimpeMurRouge = new Translation2d(Meters.of(16.5 - 1.1), Meters.of(3.7));
|
||||||
|
public static final Translation2d kGrimpeDepotBleu = new Translation2d(Meters.of(1.1), Meters.of(3.1));
|
||||||
|
public static final Translation2d kGrimpeMurBleu = new Translation2d(Meters.of(1.1), Meters.of(4.4));
|
||||||
|
|
||||||
|
public static Translation2d diffFromHub(Translation2d robotTranslation) {
|
||||||
|
if (DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue) {
|
||||||
|
return kBlueHub.minus(robotTranslation);
|
||||||
|
} else {
|
||||||
|
return kRedHub.minus(robotTranslation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Translation2d diffFromGrimpeMur(Translation2d robotTranslation) {
|
||||||
|
if (DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue) {
|
||||||
|
return kGrimpeMurBleu.minus(robotTranslation);
|
||||||
|
} else {
|
||||||
|
return kGrimpeMurRouge.minus(robotTranslation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Translation2d diffFromGrimpeDepot(Translation2d robotTranslation) {
|
||||||
|
if (DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue) {
|
||||||
|
return kGrimpeDepotBleu.minus(robotTranslation);
|
||||||
|
} else {
|
||||||
|
return kGrimpeDepotRouge.minus(robotTranslation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
75
src/main/java/frc/robot/LimeLight3.java
Normal file
75
src/main/java/frc/robot/LimeLight3.java
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
// 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;
|
||||||
|
|
||||||
|
import edu.wpi.first.net.PortForwarder;
|
||||||
|
import edu.wpi.first.networktables.NetworkTable;
|
||||||
|
import edu.wpi.first.networktables.NetworkTableEntry;
|
||||||
|
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||||
|
|
||||||
|
public class LimeLight3 {
|
||||||
|
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-balaie");
|
||||||
|
NetworkTableEntry pipeline = table.getEntry("pipeline");
|
||||||
|
|
||||||
|
/** Creates a new LimeLight3. */
|
||||||
|
public LimeLight3() {
|
||||||
|
for (int port = 5800; port <= 5807; port++) {
|
||||||
|
PortForwarder.add(port, "limelight.local", port);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double[] getBotPoseBlue() {
|
||||||
|
NetworkTable limelightTable = NetworkTableInstance.getDefault().getTable("limelight-balaie");
|
||||||
|
NetworkTableEntry BotPoseEntry = limelightTable.getEntry("botpose_orb_wpiblue");
|
||||||
|
double[] BotPose = BotPoseEntry.getDoubleArray(new double[7]);
|
||||||
|
return BotPose;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double[] getBotPoseRed() {
|
||||||
|
NetworkTable limelightTable = NetworkTableInstance.getDefault().getTable("limelight-balaie");
|
||||||
|
NetworkTableEntry BotPoseEntry = limelightTable.getEntry("botpose_orb_wpired");
|
||||||
|
double[] BotPose = BotPoseEntry.getDoubleArray(new double[7]);
|
||||||
|
return BotPose;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getTx() {
|
||||||
|
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-balaie");
|
||||||
|
NetworkTableEntry tx = table.getEntry("tx");
|
||||||
|
return tx.getDouble(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getTId() {
|
||||||
|
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-balaie");
|
||||||
|
NetworkTableEntry tid = table.getEntry("tid");
|
||||||
|
return tid.getDouble(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getTA() {
|
||||||
|
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-balaie");
|
||||||
|
NetworkTableEntry ta = table.getEntry("ta");
|
||||||
|
return ta.getDouble(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getV() {
|
||||||
|
return LimelightHelpers.getTV("limelight-balaie");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AprilTag() {
|
||||||
|
pipeline.setNumber(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Forme() {
|
||||||
|
pipeline.setNumber(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Calcule(double x1, double x2, double y1, double y2, double angle) {
|
||||||
|
if (x1 > 4) {
|
||||||
|
return (Math.abs(Math.atan2(x2 - x1, y2 - y1)) * (180 / Math.PI) - angle) / 90;
|
||||||
|
} else {
|
||||||
|
return (Math.abs(Math.atan2(x2 - x1, y2 - y1)) * (180 / Math.PI) + angle) * -1 / 90;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
74
src/main/java/frc/robot/Limelight3G.java
Normal file
74
src/main/java/frc/robot/Limelight3G.java
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
// 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;
|
||||||
|
|
||||||
|
import edu.wpi.first.net.PortForwarder;
|
||||||
|
import edu.wpi.first.networktables.NetworkTable;
|
||||||
|
import edu.wpi.first.networktables.NetworkTableEntry;
|
||||||
|
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||||
|
|
||||||
|
public class Limelight3G {
|
||||||
|
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
||||||
|
NetworkTableEntry pipeline = table.getEntry("pipeline");
|
||||||
|
|
||||||
|
/** Creates a new LimeLight3. */
|
||||||
|
public Limelight3G() {
|
||||||
|
for (int port = 5800; port <= 5807; port++) {
|
||||||
|
PortForwarder.add(port, "limelight.local", port);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double[] getBotPoseBlue() {
|
||||||
|
NetworkTable limelightTable = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
||||||
|
NetworkTableEntry BotPoseEntry = limelightTable.getEntry("botpose_wpiblue");
|
||||||
|
double[] BotPose = BotPoseEntry.getDoubleArray(new double[7]);
|
||||||
|
return BotPose;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double[] getBotPoseRed() {
|
||||||
|
NetworkTable limelightTable = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
||||||
|
NetworkTableEntry BotPoseEntry = limelightTable.getEntry("botpose_wpired");
|
||||||
|
double[] BotPose = BotPoseEntry.getDoubleArray(new double[7]);
|
||||||
|
return BotPose;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getTx() {
|
||||||
|
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
||||||
|
NetworkTableEntry tx = table.getEntry("tx");
|
||||||
|
return tx.getDouble(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getTId() {
|
||||||
|
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
||||||
|
NetworkTableEntry tid = table.getEntry("tid");
|
||||||
|
return tid.getDouble(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getTA() {
|
||||||
|
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
||||||
|
NetworkTableEntry ta = table.getEntry("ta");
|
||||||
|
return ta.getDouble(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getV() {
|
||||||
|
return LimelightHelpers.getTV("limelight-tag");
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Calcule(double x1, double x2, double y1, double y2, double angle) {
|
||||||
|
if (x1 > x2) {
|
||||||
|
if (y1 > y2) {
|
||||||
|
return Math.atan(90 - ((x2 - x1) / (y2 - y1))) * (180 / Math.PI) - angle;
|
||||||
|
} else {
|
||||||
|
return Math.atan((x2 - x1) / (y2 - y1)) * (180 / Math.PI) + 90 - angle;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (y1 > y2) {
|
||||||
|
return Math.atan(90 - ((x2 - x1) / (y2 - y1))) * (180 / Math.PI) + 270 - angle;
|
||||||
|
} else {
|
||||||
|
return Math.atan((x2 - x1) / (y2 - y1)) * (180 / Math.PI) + 180 - angle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
package frc.robot;
|
package frc.robot;
|
||||||
|
|
||||||
|
import edu.wpi.first.math.VecBuilder;
|
||||||
|
import edu.wpi.first.math.util.Units;
|
||||||
import edu.wpi.first.wpilibj.TimedRobot;
|
import edu.wpi.first.wpilibj.TimedRobot;
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
||||||
@@ -20,16 +22,34 @@ public class Robot extends TimedRobot {
|
|||||||
@Override
|
@Override
|
||||||
public void robotPeriodic() {
|
public void robotPeriodic() {
|
||||||
CommandScheduler.getInstance().run();
|
CommandScheduler.getInstance().run();
|
||||||
|
var driveState = m_robotContainer.drivetrain.getState();
|
||||||
|
double headingDeg = driveState.Pose.getRotation().getDegrees();
|
||||||
|
double omegaRps = Units.radiansToRotations(driveState.Speeds.omegaRadiansPerSecond);
|
||||||
|
|
||||||
|
LimelightHelpers.SetRobotOrientation("limelight_tag", headingDeg, 0, 0, 0, 0, 0);
|
||||||
|
var llMeasurement = LimelightHelpers.getBotPoseEstimate_wpiBlue_MegaTag2("limelight_tag");
|
||||||
|
var stdDevs = LimelightHelpers.getLimelightDoubleArrayEntry("limelight_tag", "stddevs");
|
||||||
|
var limelightStdDevs = VecBuilder.fill(.5, .5, 9999999);
|
||||||
|
if (stdDevs.exists()) {
|
||||||
|
limelightStdDevs = VecBuilder.fill(stdDevs.get()[6], stdDevs.get()[7], stdDevs.get()[12]);
|
||||||
|
}
|
||||||
|
if (llMeasurement != null && llMeasurement.tagCount > 0 && Math.abs(omegaRps) < 2.0) {
|
||||||
|
m_robotContainer.drivetrain.addVisionMeasurement(llMeasurement.pose, llMeasurement.timestampSeconds,
|
||||||
|
limelightStdDevs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disabledInit() {}
|
public void disabledInit() {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disabledPeriodic() {}
|
public void disabledPeriodic() {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disabledExit() {}
|
public void disabledExit() {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autonomousInit() {
|
public void autonomousInit() {
|
||||||
@@ -41,10 +61,12 @@ public class Robot extends TimedRobot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autonomousPeriodic() {}
|
public void autonomousPeriodic() {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autonomousExit() {}
|
public void autonomousExit() {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void teleopInit() {
|
public void teleopInit() {
|
||||||
@@ -54,10 +76,12 @@ public class Robot extends TimedRobot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void teleopPeriodic() {}
|
public void teleopPeriodic() {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void teleopExit() {}
|
public void teleopExit() {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void testInit() {
|
public void testInit() {
|
||||||
@@ -65,8 +89,10 @@ public class Robot extends TimedRobot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void testPeriodic() {}
|
public void testPeriodic() {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void testExit() {}
|
public void testExit() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,44 +4,115 @@
|
|||||||
|
|
||||||
package frc.robot;
|
package frc.robot;
|
||||||
|
|
||||||
|
import static edu.wpi.first.units.Units.MetersPerSecond;
|
||||||
|
import static edu.wpi.first.units.Units.RadiansPerSecond;
|
||||||
|
import static edu.wpi.first.units.Units.RotationsPerSecond;
|
||||||
|
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveModule.DriveRequestType;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveRequest;
|
||||||
|
import com.pathplanner.lib.auto.AutoBuilder;
|
||||||
|
import com.pathplanner.lib.auto.NamedCommands;
|
||||||
|
|
||||||
import edu.wpi.first.cameraserver.CameraServer;
|
import edu.wpi.first.cameraserver.CameraServer;
|
||||||
|
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
|
||||||
|
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
import edu.wpi.first.wpilibj2.command.Commands;
|
import edu.wpi.first.wpilibj2.command.Commands;
|
||||||
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
||||||
import frc.robot.commands.Aspirer;
|
import frc.robot.commands.ModeAuto.RetourMilieuDroite;
|
||||||
import frc.robot.commands.DescendreBalyeuse;
|
import frc.robot.commands.ModeAuto.RetourMilieuGauche;
|
||||||
import frc.robot.commands.DescendreGrimpeur;
|
import frc.robot.commands.ModeAuto.TournerVersMur;
|
||||||
import frc.robot.commands.Lancer;
|
import frc.robot.commands.ModeAuto.TournerVersReservoir;
|
||||||
import frc.robot.commands.MonterBalyeuse;
|
import frc.robot.generated.TunerConstants;
|
||||||
import frc.robot.commands.MonterGrimpeur;
|
|
||||||
import frc.robot.subsystems.Balayeuse;
|
import frc.robot.subsystems.Balayeuse;
|
||||||
|
import frc.robot.subsystems.CommandSwerveDrivetrain;
|
||||||
|
import frc.robot.subsystems.Demeleur;
|
||||||
import frc.robot.subsystems.Grimpeur;
|
import frc.robot.subsystems.Grimpeur;
|
||||||
import frc.robot.subsystems.Lanceur;
|
import frc.robot.subsystems.Lanceur;
|
||||||
import frc.robot.subsystems.Led;
|
import frc.robot.subsystems.Led;
|
||||||
import frc.robot.subsystems.LimeLight3;
|
import frc.robot.subsystems.PivotBalayeuse;
|
||||||
|
|
||||||
public class RobotContainer {
|
public class RobotContainer {
|
||||||
Balayeuse balayeuse = new Balayeuse();
|
private final SendableChooser<Command> autoChooser;
|
||||||
Grimpeur grimpeur = new Grimpeur();
|
public final CommandSwerveDrivetrain drivetrain = TunerConstants.createDrivetrain();
|
||||||
Lanceur lanceur = new Lanceur();
|
private final Balayeuse balayeuse = new Balayeuse();
|
||||||
LimeLight3 limeLight3 = new LimeLight3();
|
private final PivotBalayeuse pivotBalayeuse = new PivotBalayeuse();
|
||||||
Led led = new Led();
|
private final Demeleur demeleur = new Demeleur();
|
||||||
CommandXboxController manette = new CommandXboxController(0);
|
private final Grimpeur grimpeur = new Grimpeur();
|
||||||
|
private final Lanceur lanceur = new Lanceur();
|
||||||
|
private final Commandes commandes = new Commandes(drivetrain, lanceur, demeleur, balayeuse, grimpeur, pivotBalayeuse);
|
||||||
|
private final LimeLight3 limeLight3 = new LimeLight3();
|
||||||
|
private final Limelight3G limeLight3G = new Limelight3G();
|
||||||
|
private final Led led = new Led();
|
||||||
|
private final CommandXboxController manette = new CommandXboxController(0);
|
||||||
|
private final CommandXboxController manette1 = new CommandXboxController(1);
|
||||||
|
private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond); // kSpeedAt12Volts desired top speed
|
||||||
|
private double MaxAngularRate = RotationsPerSecond.of(0.75).in(RadiansPerSecond); // 3/4 of a rotation per second max
|
||||||
|
// angular velocity
|
||||||
|
|
||||||
|
/* Setting up bindings for necessary control of the swerve drive platform */
|
||||||
|
private final SwerveRequest.FieldCentric drive = new SwerveRequest.FieldCentric()
|
||||||
|
.withDeadband(MaxSpeed * 0.1).withRotationalDeadband(MaxAngularRate * 0.1) // Add a 10% deadband
|
||||||
|
.withDriveRequestType(DriveRequestType.OpenLoopVoltage); // Use open-loop control for drive motors
|
||||||
|
|
||||||
|
private final Telemetry logger = new Telemetry(MaxSpeed);
|
||||||
|
|
||||||
public RobotContainer() {
|
public RobotContainer() {
|
||||||
|
NamedCommands.registerCommand("GrimperMur", drivetrain.allerGrimpeMur());
|
||||||
|
NamedCommands.registerCommand("GrimperReservoir", drivetrain.allerGrimpeDepot());
|
||||||
|
NamedCommands.registerCommand("Lancer", commandes.lancer());
|
||||||
|
NamedCommands.registerCommand("RetourMilieuDroite", new RetourMilieuDroite(drivetrain, limeLight3G));
|
||||||
|
NamedCommands.registerCommand("RetourMilieuGauche", new RetourMilieuGauche(drivetrain, limeLight3G));
|
||||||
|
NamedCommands.registerCommand("Limelighter", commandes.viserLancer());
|
||||||
|
NamedCommands.registerCommand("DescendreBalayeuse", pivotBalayeuse.descendre());
|
||||||
|
NamedCommands.registerCommand("Aspirer", balayeuse.aspirer());
|
||||||
|
NamedCommands.registerCommand("TournerA180", new TournerVersReservoir(drivetrain));
|
||||||
|
NamedCommands.registerCommand("TournerAZero", new TournerVersMur(drivetrain));
|
||||||
|
NamedCommands.registerCommand("MonterGrimpeur", grimpeur.sortir());
|
||||||
|
NamedCommands.registerCommand("DescendreGrimpeur", grimpeur.rentrer());
|
||||||
|
autoChooser = AutoBuilder.buildAutoChooser();
|
||||||
|
SmartDashboard.putData("Auto Chooser", autoChooser);
|
||||||
|
|
||||||
CameraServer.startAutomaticCapture();
|
CameraServer.startAutomaticCapture();
|
||||||
|
|
||||||
configureBindings();
|
configureBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void configureBindings() {
|
private void configureBindings() {
|
||||||
manette.a().whileTrue(new Lancer(lanceur,limeLight3,balayeuse,led));
|
|
||||||
manette.rightTrigger().whileTrue(new MonterGrimpeur(grimpeur));
|
// Manette 0 (pilote)
|
||||||
manette.leftTrigger().whileTrue(new DescendreGrimpeur(grimpeur));
|
drivetrain.setDefaultCommand(
|
||||||
manette.rightBumper().whileTrue(new MonterBalyeuse(balayeuse));
|
drivetrain.applyRequest(() -> drive
|
||||||
manette.leftBumper().whileTrue(new DescendreBalyeuse(balayeuse));
|
.withVelocityY(-manette.getLeftX() * MaxSpeed * 0.7)
|
||||||
manette.b().whileTrue(new Aspirer(balayeuse,led));
|
.withVelocityX(-manette.getLeftY() * MaxSpeed * 0.7)
|
||||||
|
.withRotationalRate(-manette.getRightX() * MaxAngularRate)));
|
||||||
|
manette.rightBumper().whileTrue(balayeuse.aspirer());
|
||||||
|
manette.povUp().whileTrue(grimpeur.sortir());
|
||||||
|
manette.povDown().whileTrue(grimpeur.rentrer());
|
||||||
|
|
||||||
|
manette.rightTrigger().whileTrue(commandes.lancer());
|
||||||
|
manette.leftTrigger().whileTrue(
|
||||||
|
commandes.viserLancer(() -> -manette.getLeftY() * MaxSpeed * 0.7, () -> -manette.getLeftX() * MaxSpeed * 0.7));
|
||||||
|
manette.leftBumper().whileTrue(pivotBalayeuse.descendre());
|
||||||
|
manette.b().whileTrue(drivetrain.allerGrimpeDepot());
|
||||||
|
manette.x().whileTrue(drivetrain.allerGrimpeMur());
|
||||||
|
|
||||||
|
// Manette 1 (co-pilote)
|
||||||
|
manette1.rightTrigger().whileTrue(balayeuse.aspirer());
|
||||||
|
|
||||||
|
manette1.rightBumper().whileTrue(pivotBalayeuse.monter());
|
||||||
|
manette1.leftTrigger().whileTrue(commandes.lancer(() -> lanceur.ntBasseVitesse()));
|
||||||
|
manette1.leftBumper().whileTrue(pivotBalayeuse.descendre());
|
||||||
|
manette1.x().whileTrue(commandes.lancerAspirer());
|
||||||
|
manette1.b().whileTrue(Commands.parallel(lanceur.inverse(), demeleur.inverse()));
|
||||||
|
manette1.a().whileTrue(demeleur.inverse());
|
||||||
|
manette1.y().whileTrue(balayeuse.ejecter());
|
||||||
|
|
||||||
|
drivetrain.registerTelemetry(logger::telemeterize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Command getAutonomousCommand() {
|
public Command getAutonomousCommand() {
|
||||||
return Commands.print("No autonomous command configured");
|
return autoChooser.getSelected();
|
||||||
|
// return getAutonomousCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
121
src/main/java/frc/robot/Telemetry.java
Normal file
121
src/main/java/frc/robot/Telemetry.java
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
package frc.robot;
|
||||||
|
|
||||||
|
import com.ctre.phoenix6.SignalLogger;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveDrivetrain.SwerveDriveState;
|
||||||
|
|
||||||
|
import edu.wpi.first.math.geometry.Pose2d;
|
||||||
|
import edu.wpi.first.math.kinematics.ChassisSpeeds;
|
||||||
|
import edu.wpi.first.math.kinematics.SwerveModulePosition;
|
||||||
|
import edu.wpi.first.math.kinematics.SwerveModuleState;
|
||||||
|
import edu.wpi.first.networktables.DoubleArrayPublisher;
|
||||||
|
import edu.wpi.first.networktables.DoublePublisher;
|
||||||
|
import edu.wpi.first.networktables.NetworkTable;
|
||||||
|
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||||
|
import edu.wpi.first.networktables.StringPublisher;
|
||||||
|
import edu.wpi.first.networktables.StructArrayPublisher;
|
||||||
|
import edu.wpi.first.networktables.StructPublisher;
|
||||||
|
import edu.wpi.first.wpilibj.smartdashboard.Mechanism2d;
|
||||||
|
import edu.wpi.first.wpilibj.smartdashboard.MechanismLigament2d;
|
||||||
|
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||||
|
import edu.wpi.first.wpilibj.util.Color;
|
||||||
|
import edu.wpi.first.wpilibj.util.Color8Bit;
|
||||||
|
|
||||||
|
public class Telemetry {
|
||||||
|
private final double MaxSpeed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct a telemetry object, with the specified max speed of the robot
|
||||||
|
*
|
||||||
|
* @param maxSpeed Maximum speed in meters per second
|
||||||
|
*/
|
||||||
|
public Telemetry(double maxSpeed) {
|
||||||
|
MaxSpeed = maxSpeed;
|
||||||
|
SignalLogger.start();
|
||||||
|
|
||||||
|
/* Set up the module state Mechanism2d telemetry */
|
||||||
|
for (int i = 0; i < 4; ++i) {
|
||||||
|
SmartDashboard.putData("Module " + i, m_moduleMechanisms[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* What to publish over networktables for telemetry */
|
||||||
|
private final NetworkTableInstance inst = NetworkTableInstance.getDefault();
|
||||||
|
|
||||||
|
/* Robot swerve drive state */
|
||||||
|
private final NetworkTable driveStateTable = inst.getTable("DriveState");
|
||||||
|
private final StructPublisher<Pose2d> drivePose = driveStateTable.getStructTopic("Pose", Pose2d.struct).publish();
|
||||||
|
private final StructPublisher<ChassisSpeeds> driveSpeeds = driveStateTable.getStructTopic("Speeds", ChassisSpeeds.struct).publish();
|
||||||
|
private final StructArrayPublisher<SwerveModuleState> driveModuleStates = driveStateTable.getStructArrayTopic("ModuleStates", SwerveModuleState.struct).publish();
|
||||||
|
private final StructArrayPublisher<SwerveModuleState> driveModuleTargets = driveStateTable.getStructArrayTopic("ModuleTargets", SwerveModuleState.struct).publish();
|
||||||
|
private final StructArrayPublisher<SwerveModulePosition> driveModulePositions = driveStateTable.getStructArrayTopic("ModulePositions", SwerveModulePosition.struct).publish();
|
||||||
|
private final DoublePublisher driveTimestamp = driveStateTable.getDoubleTopic("Timestamp").publish();
|
||||||
|
private final DoublePublisher driveOdometryFrequency = driveStateTable.getDoubleTopic("OdometryFrequency").publish();
|
||||||
|
|
||||||
|
/* Robot pose for field positioning */
|
||||||
|
private final NetworkTable table = inst.getTable("Pose");
|
||||||
|
private final DoubleArrayPublisher fieldPub = table.getDoubleArrayTopic("robotPose").publish();
|
||||||
|
private final StringPublisher fieldTypePub = table.getStringTopic(".type").publish();
|
||||||
|
|
||||||
|
/* Mechanisms to represent the swerve module states */
|
||||||
|
private final Mechanism2d[] m_moduleMechanisms = new Mechanism2d[] {
|
||||||
|
new Mechanism2d(1, 1),
|
||||||
|
new Mechanism2d(1, 1),
|
||||||
|
new Mechanism2d(1, 1),
|
||||||
|
new Mechanism2d(1, 1),
|
||||||
|
};
|
||||||
|
/* A direction and length changing ligament for speed representation */
|
||||||
|
private final MechanismLigament2d[] m_moduleSpeeds = new MechanismLigament2d[] {
|
||||||
|
m_moduleMechanisms[0].getRoot("RootSpeed", 0.5, 0.5).append(new MechanismLigament2d("Speed", 0.5, 0)),
|
||||||
|
m_moduleMechanisms[1].getRoot("RootSpeed", 0.5, 0.5).append(new MechanismLigament2d("Speed", 0.5, 0)),
|
||||||
|
m_moduleMechanisms[2].getRoot("RootSpeed", 0.5, 0.5).append(new MechanismLigament2d("Speed", 0.5, 0)),
|
||||||
|
m_moduleMechanisms[3].getRoot("RootSpeed", 0.5, 0.5).append(new MechanismLigament2d("Speed", 0.5, 0)),
|
||||||
|
};
|
||||||
|
/* A direction changing and length constant ligament for module direction */
|
||||||
|
private final MechanismLigament2d[] m_moduleDirections = new MechanismLigament2d[] {
|
||||||
|
m_moduleMechanisms[0].getRoot("RootDirection", 0.5, 0.5)
|
||||||
|
.append(new MechanismLigament2d("Direction", 0.1, 0, 0, new Color8Bit(Color.kWhite))),
|
||||||
|
m_moduleMechanisms[1].getRoot("RootDirection", 0.5, 0.5)
|
||||||
|
.append(new MechanismLigament2d("Direction", 0.1, 0, 0, new Color8Bit(Color.kWhite))),
|
||||||
|
m_moduleMechanisms[2].getRoot("RootDirection", 0.5, 0.5)
|
||||||
|
.append(new MechanismLigament2d("Direction", 0.1, 0, 0, new Color8Bit(Color.kWhite))),
|
||||||
|
m_moduleMechanisms[3].getRoot("RootDirection", 0.5, 0.5)
|
||||||
|
.append(new MechanismLigament2d("Direction", 0.1, 0, 0, new Color8Bit(Color.kWhite))),
|
||||||
|
};
|
||||||
|
|
||||||
|
private final double[] m_poseArray = new double[3];
|
||||||
|
|
||||||
|
/** Accept the swerve drive state and telemeterize it to SmartDashboard and SignalLogger. */
|
||||||
|
public void telemeterize(SwerveDriveState state) {
|
||||||
|
/* Telemeterize the swerve drive state */
|
||||||
|
drivePose.set(state.Pose);
|
||||||
|
driveSpeeds.set(state.Speeds);
|
||||||
|
driveModuleStates.set(state.ModuleStates);
|
||||||
|
driveModuleTargets.set(state.ModuleTargets);
|
||||||
|
driveModulePositions.set(state.ModulePositions);
|
||||||
|
driveTimestamp.set(state.Timestamp);
|
||||||
|
driveOdometryFrequency.set(1.0 / state.OdometryPeriod);
|
||||||
|
|
||||||
|
/* Also write to log file */
|
||||||
|
// SignalLogger.writeStruct("DriveState/Pose", Pose2d.struct, state.Pose);
|
||||||
|
// SignalLogger.writeStruct("DriveState/Speeds", ChassisSpeeds.struct, state.Speeds);
|
||||||
|
// SignalLogger.writeStructArray("DriveState/ModuleStates", SwerveModuleState.struct, state.ModuleStates);
|
||||||
|
// SignalLogger.writeStructArray("DriveState/ModuleTargets", SwerveModuleState.struct, state.ModuleTargets);
|
||||||
|
// SignalLogger.writeStructArray("DriveState/ModulePositions", SwerveModulePosition.struct, state.ModulePositions);
|
||||||
|
// SignalLogger.writeDouble("DriveState/OdometryPeriod", state.OdometryPeriod, "seconds");
|
||||||
|
|
||||||
|
/* Telemeterize the pose to a Field2d */
|
||||||
|
fieldTypePub.set("Field2d");
|
||||||
|
|
||||||
|
m_poseArray[0] = state.Pose.getX();
|
||||||
|
m_poseArray[1] = state.Pose.getY();
|
||||||
|
m_poseArray[2] = state.Pose.getRotation().getDegrees();
|
||||||
|
fieldPub.set(m_poseArray);
|
||||||
|
|
||||||
|
/* Telemeterize each module state to a Mechanism2d */
|
||||||
|
for (int i = 0; i < 4; ++i) {
|
||||||
|
m_moduleSpeeds[i].setAngle(state.ModuleStates[i].angle);
|
||||||
|
m_moduleDirections[i].setAngle(state.ModuleStates[i].angle);
|
||||||
|
m_moduleSpeeds[i].setLength(state.ModuleStates[i].speedMetersPerSecond / (2 * MaxSpeed));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,74 +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.wpilibj.Timer;
|
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
|
||||||
import frc.robot.subsystems.Balayeuse;
|
|
||||||
import frc.robot.subsystems.Led;
|
|
||||||
|
|
||||||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
|
||||||
public class Aspirer extends Command {
|
|
||||||
private Balayeuse balayeuse;
|
|
||||||
private Timer timer;
|
|
||||||
private Led led;
|
|
||||||
private double temp;
|
|
||||||
/** Creates a new Aspirer. */
|
|
||||||
public Aspirer(Balayeuse balayeuse, Led led) {
|
|
||||||
this.balayeuse = balayeuse;
|
|
||||||
this.led = led;
|
|
||||||
this.timer = new Timer();
|
|
||||||
addRequirements(balayeuse, led);
|
|
||||||
this.temp = 0;
|
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called when the command is initially scheduled.
|
|
||||||
@Override
|
|
||||||
public void initialize() {
|
|
||||||
timer.reset();
|
|
||||||
temp = balayeuse.Amp();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called every time the scheduler runs while the command is scheduled.
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
|
||||||
timer.start();
|
|
||||||
int nbFois = 0;
|
|
||||||
double moyenneAmp = 0;
|
|
||||||
if(timer.get() <3){
|
|
||||||
nbFois++;
|
|
||||||
moyenneAmp += balayeuse.Amp() / nbFois;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
nbFois++;
|
|
||||||
moyenneAmp -= temp;
|
|
||||||
moyenneAmp += balayeuse.Amp() / nbFois;
|
|
||||||
temp = balayeuse.Amp();
|
|
||||||
}
|
|
||||||
if(moyenneAmp < 40){
|
|
||||||
timer.reset();
|
|
||||||
balayeuse.Balayer(0.5);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
balayeuse.Balayer(0);
|
|
||||||
led.Jaune2();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
|
||||||
@Override
|
|
||||||
public void end(boolean interrupted) {
|
|
||||||
balayeuse.Balayer(0);
|
|
||||||
timer.stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns true when the command should end.
|
|
||||||
@Override
|
|
||||||
public boolean isFinished() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,43 +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.Command;
|
|
||||||
import frc.robot.subsystems.Balayeuse;
|
|
||||||
|
|
||||||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
|
||||||
public class DescendreBalyeuse extends Command {
|
|
||||||
private Balayeuse balayeuse;
|
|
||||||
/** Creates a new Descendre. */
|
|
||||||
public DescendreBalyeuse(Balayeuse balayeuse) {
|
|
||||||
this.balayeuse = balayeuse;
|
|
||||||
addRequirements(balayeuse);
|
|
||||||
// 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() {
|
|
||||||
if(balayeuse.Distance() < balayeuse.EncodeurBalayeuse()){
|
|
||||||
balayeuse.Pivoter(-0.2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
|
||||||
@Override
|
|
||||||
public void end(boolean interrupted) {
|
|
||||||
balayeuse.Pivoter(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns true when the command should end.
|
|
||||||
@Override
|
|
||||||
public boolean isFinished() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,46 +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.Command;
|
|
||||||
import frc.robot.subsystems.Grimpeur;
|
|
||||||
|
|
||||||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
|
||||||
public class DescendreGrimpeur extends Command {
|
|
||||||
private Grimpeur grimpeur;
|
|
||||||
/** Creates a new DescendreGrimpeur. */
|
|
||||||
public DescendreGrimpeur(Grimpeur grimpeur) {
|
|
||||||
this.grimpeur = grimpeur;
|
|
||||||
// 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() {
|
|
||||||
if(!grimpeur.Limit()){
|
|
||||||
grimpeur.Grimper(-0.5);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
grimpeur.Reset();
|
|
||||||
grimpeur.Grimper(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
|
||||||
@Override
|
|
||||||
public void end(boolean interrupted) {
|
|
||||||
grimpeur.Grimper(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns true when the command should end.
|
|
||||||
@Override
|
|
||||||
public boolean isFinished() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,90 +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.math.controller.PIDController;
|
|
||||||
import edu.wpi.first.wpilibj.Timer;
|
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
|
||||||
import frc.robot.subsystems.Balayeuse;
|
|
||||||
import frc.robot.subsystems.Lanceur;
|
|
||||||
import frc.robot.subsystems.Led;
|
|
||||||
import frc.robot.subsystems.LimeLight3;
|
|
||||||
import frc.robot.subsystems.Limelight3G;
|
|
||||||
|
|
||||||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
|
||||||
public class Lancer extends Command {
|
|
||||||
private Lanceur lanceur;
|
|
||||||
private PIDController pidController;
|
|
||||||
private Limelight3G limeLight3G;
|
|
||||||
private Timer timer;
|
|
||||||
private Balayeuse balayeuse;
|
|
||||||
private Led led;
|
|
||||||
private double temp;
|
|
||||||
/** Creates a new Lancer. */
|
|
||||||
public Lancer(Lanceur lanceur, LimeLight3 limeLight3, Balayeuse balayeuse,Led led) {
|
|
||||||
this.lanceur = lanceur;
|
|
||||||
this.balayeuse = balayeuse;
|
|
||||||
this.led = led;
|
|
||||||
this.timer = new Timer();
|
|
||||||
this.limeLight3G = new Limelight3G();
|
|
||||||
addRequirements(lanceur);
|
|
||||||
this.temp = 0;
|
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called when the command is initially scheduled.
|
|
||||||
@Override
|
|
||||||
public void initialize() {
|
|
||||||
pidController = new PIDController(0, 0,0, 0);
|
|
||||||
timer.reset();
|
|
||||||
timer.start();
|
|
||||||
temp = lanceur.Amp();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called every time the scheduler runs while the command is scheduled.
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
|
||||||
int nbFois = 0;
|
|
||||||
|
|
||||||
double moyenneAmp = 0;
|
|
||||||
if(timer.get() < 3){
|
|
||||||
nbFois++;
|
|
||||||
moyenneAmp += balayeuse.Amp() / nbFois;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
nbFois++;
|
|
||||||
moyenneAmp -= temp;
|
|
||||||
moyenneAmp += balayeuse.Amp() / nbFois;
|
|
||||||
temp = balayeuse.Amp();
|
|
||||||
}
|
|
||||||
if(moyenneAmp > 30 && nbFois > 10){
|
|
||||||
timer.reset();
|
|
||||||
balayeuse.Balayer(0.5);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
double vitesse = (100-limeLight3G.getTA())/lanceur.Vitesse();
|
|
||||||
double output = pidController.calculate(lanceur.Vitesse(),vitesse);
|
|
||||||
lanceur.Lancer(output);
|
|
||||||
if(lanceur.Vitesse() >= vitesse){
|
|
||||||
lanceur.Demeler(0.5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
|
||||||
@Override
|
|
||||||
public void end(boolean interrupted) {
|
|
||||||
lanceur.Demeler(0);
|
|
||||||
lanceur.Lancer(0);
|
|
||||||
balayeuse.Pivoter(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns true when the command should end.
|
|
||||||
@Override
|
|
||||||
public boolean isFinished() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,65 +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.math.controller.PIDController;
|
|
||||||
import edu.wpi.first.wpilibj.Timer;
|
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
|
||||||
import frc.robot.subsystems.Balayeuse;
|
|
||||||
import frc.robot.subsystems.Lanceur;
|
|
||||||
import frc.robot.subsystems.Led;
|
|
||||||
import frc.robot.subsystems.LimeLight3;
|
|
||||||
import frc.robot.subsystems.Limelight3G;
|
|
||||||
|
|
||||||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
|
||||||
public class LancerOposer extends Command {
|
|
||||||
private Lanceur lanceur;
|
|
||||||
private PIDController pidController;
|
|
||||||
private Limelight3G limeLight3G;
|
|
||||||
private Timer timer;
|
|
||||||
private Balayeuse balayeuse;
|
|
||||||
private Led led;
|
|
||||||
private double temp;
|
|
||||||
/** Creates a new Lancer. */
|
|
||||||
public LancerOposer(Lanceur lanceur, LimeLight3 limeLight3, Balayeuse balayeuse,Led led) {
|
|
||||||
this.lanceur = lanceur;
|
|
||||||
this.balayeuse = balayeuse;
|
|
||||||
this.led = led;
|
|
||||||
this.timer = new Timer();
|
|
||||||
this.limeLight3G = new Limelight3G();
|
|
||||||
addRequirements(lanceur);
|
|
||||||
this.temp = 0;
|
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called when the command is initially scheduled.
|
|
||||||
@Override
|
|
||||||
public void initialize() {
|
|
||||||
pidController = new PIDController(0, 0,0, 0);
|
|
||||||
timer.reset();
|
|
||||||
timer.start();
|
|
||||||
temp = lanceur.Amp();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called every time the scheduler runs while the command is scheduled.
|
|
||||||
@Override
|
|
||||||
public void execute() {
|
|
||||||
lanceur.Lancer(-0.2);
|
|
||||||
lanceur.Demeler(-0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
|
||||||
@Override
|
|
||||||
public void end(boolean interrupted) {
|
|
||||||
lanceur.Demeler(0);
|
|
||||||
lanceur.Lancer(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns true when the command should end.
|
|
||||||
@Override
|
|
||||||
public boolean isFinished() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
// 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.ModeAuto;
|
||||||
|
|
||||||
|
import static edu.wpi.first.units.Units.*;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.ctre.phoenix6.hardware.Pigeon2;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveModule.DriveRequestType;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveRequest;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation;
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation.Alliance;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import frc.robot.Limelight3G;
|
||||||
|
import frc.robot.generated.TunerConstants;
|
||||||
|
import frc.robot.subsystems.CommandSwerveDrivetrain;
|
||||||
|
|
||||||
|
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
||||||
|
public class RetourMilieuDroite extends Command {
|
||||||
|
CommandSwerveDrivetrain drivetrain;
|
||||||
|
Limelight3G limelight3g;
|
||||||
|
double botx;
|
||||||
|
double boty;
|
||||||
|
double x;
|
||||||
|
double y;
|
||||||
|
double angle;
|
||||||
|
private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond);
|
||||||
|
private double MaxAngularRate = RotationsPerSecond.of(0.75).in(RadiansPerSecond);
|
||||||
|
Optional<Alliance> alliance = DriverStation.getAlliance();
|
||||||
|
private final SwerveRequest.FieldCentric drive = new SwerveRequest.FieldCentric()
|
||||||
|
.withDeadband(MaxSpeed * 0.1).withRotationalDeadband(MaxAngularRate * 0.1)
|
||||||
|
.withDriveRequestType(DriveRequestType.OpenLoopVoltage);
|
||||||
|
/** Creates a new RetourMilieu. */
|
||||||
|
public RetourMilieuDroite(CommandSwerveDrivetrain drivetrain, Limelight3G limelight3g) {
|
||||||
|
this.drivetrain = drivetrain;
|
||||||
|
this.limelight3g = limelight3g;
|
||||||
|
addRequirements(drivetrain);
|
||||||
|
// 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() {
|
||||||
|
if(angle < 0){
|
||||||
|
angle = angle + 360;
|
||||||
|
}
|
||||||
|
if(alliance.get() == Alliance.Blue){
|
||||||
|
y = 0.639;
|
||||||
|
x = 2.305;
|
||||||
|
angle = 0;
|
||||||
|
if(limelight3g.getV()){
|
||||||
|
if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >355 || drivetrain.getPigeon2().getYaw().getValueAsDouble() < 5){
|
||||||
|
if((y-boty < 0.05 && y-boty >-0.05) && (x-botx < 0.05 && x-botx > -0.05)){
|
||||||
|
drivetrain.setControl(drive.withVelocityX(0).withVelocityY(0));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(botx < 6){
|
||||||
|
drivetrain.setControl(drive.withVelocityX(y-boty));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
drivetrain.setControl(drive.withVelocityX(y-boty).withVelocityY(x-botx));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >angle && drivetrain.getPigeon2().getYaw().getValueAsDouble() <angle +180){
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(0.5));
|
||||||
|
}
|
||||||
|
else if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >=angle +180){
|
||||||
|
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(-0.5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
y = 7.380;
|
||||||
|
x = 13.963;
|
||||||
|
angle = 180;
|
||||||
|
if(limelight3g.getV()){
|
||||||
|
}
|
||||||
|
if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >0 && drivetrain.getPigeon2().getYaw().getValueAsDouble() <180){
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(0.5));
|
||||||
|
}
|
||||||
|
else if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >180){
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(-0.5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called once the command ends or is interrupted.
|
||||||
|
@Override
|
||||||
|
public void end(boolean interrupted) {
|
||||||
|
drivetrain.setControl(drive.withVelocityX(0).withVelocityY(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns true when the command should end.
|
||||||
|
@Override
|
||||||
|
public boolean isFinished() {
|
||||||
|
return (y-boty < 0.05 && y-boty >-0.05) && (x-botx < 0.05 && x-botx > -0.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
// 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.ModeAuto;
|
||||||
|
|
||||||
|
import static edu.wpi.first.units.Units.*;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.ctre.phoenix6.hardware.Pigeon2;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveModule.DriveRequestType;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveRequest;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation;
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation.Alliance;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import frc.robot.Limelight3G;
|
||||||
|
import frc.robot.generated.TunerConstants;
|
||||||
|
import frc.robot.subsystems.CommandSwerveDrivetrain;
|
||||||
|
|
||||||
|
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
||||||
|
public class RetourMilieuGauche extends Command {
|
||||||
|
CommandSwerveDrivetrain drivetrain;
|
||||||
|
Limelight3G limelight3g;
|
||||||
|
double botx;
|
||||||
|
double boty;
|
||||||
|
double x;
|
||||||
|
double y;
|
||||||
|
double angle;
|
||||||
|
private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond);
|
||||||
|
private double MaxAngularRate = RotationsPerSecond.of(0.75).in(RadiansPerSecond);
|
||||||
|
Optional<Alliance> alliance = DriverStation.getAlliance();
|
||||||
|
private final SwerveRequest.FieldCentric drive = new SwerveRequest.FieldCentric()
|
||||||
|
.withDeadband(MaxSpeed * 0.1).withRotationalDeadband(MaxAngularRate * 0.1)
|
||||||
|
.withDriveRequestType(DriveRequestType.OpenLoopVoltage);
|
||||||
|
/** Creates a new RetourMilieu. */
|
||||||
|
public RetourMilieuGauche(CommandSwerveDrivetrain drivetrain, Limelight3G limelight3g) {
|
||||||
|
this.drivetrain = drivetrain;
|
||||||
|
this.limelight3g = limelight3g;
|
||||||
|
addRequirements(drivetrain);
|
||||||
|
// 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() {
|
||||||
|
if(angle < 0){
|
||||||
|
angle = angle + 360;
|
||||||
|
}
|
||||||
|
double[] BotPose = new double[6];
|
||||||
|
BotPose = limelight3g.getBotPoseBlue();
|
||||||
|
botx = BotPose[0];
|
||||||
|
boty = BotPose[1];
|
||||||
|
|
||||||
|
if(alliance.get() == Alliance.Blue){
|
||||||
|
y = 7.380;
|
||||||
|
x = 2.305;
|
||||||
|
angle = 0;
|
||||||
|
if(limelight3g.getV()){
|
||||||
|
if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >355 || drivetrain.getPigeon2().getYaw().getValueAsDouble() < 5){
|
||||||
|
if((y-boty < 0.05 && y-boty >-0.05) && (x-botx < 0.05 && x-botx > -0.05)){
|
||||||
|
drivetrain.setControl(drive.withVelocityX(0).withVelocityY(0));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(botx < 6){
|
||||||
|
drivetrain.setControl(drive.withVelocityX(y-boty));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
drivetrain.setControl(drive.withVelocityX(y-boty).withVelocityY(x-botx));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >angle && drivetrain.getPigeon2().getYaw().getValueAsDouble() <angle +180){
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(0.5));
|
||||||
|
}
|
||||||
|
else if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >=angle +180){
|
||||||
|
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(-0.5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
y = 0.639;
|
||||||
|
x = 13.963;
|
||||||
|
angle = 180;
|
||||||
|
if(limelight3g.getV()){
|
||||||
|
if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >175 && drivetrain.getPigeon2().getYaw().getValueAsDouble() < 185){
|
||||||
|
if((y-boty < 0.05 && y-boty >-0.05) && (x-botx < 0.05 && x-botx > -0.05)){
|
||||||
|
drivetrain.setControl(drive.withVelocityX(0).withVelocityY(0));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(botx > 10){
|
||||||
|
drivetrain.setControl(drive.withVelocityX(y-boty));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
drivetrain.setControl(drive.withVelocityX(y-boty).withVelocityY(x-botx));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >0 && drivetrain.getPigeon2().getYaw().getValueAsDouble() <180){
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(-0.5));
|
||||||
|
}
|
||||||
|
else if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >=180){
|
||||||
|
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(0.5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called once the command ends or is interrupted.
|
||||||
|
@Override
|
||||||
|
public void end(boolean interrupted) {
|
||||||
|
drivetrain.setControl(drive.withVelocityX(0).withVelocityY(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns true when the command should end.
|
||||||
|
@Override
|
||||||
|
public boolean isFinished() {
|
||||||
|
return (y-boty < 0.05 && y-boty >-0.05) && (x-botx < 0.05 && x-botx > -0.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
// 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.ModeAuto;
|
||||||
|
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveModule.DriveRequestType;
|
||||||
|
import com.ctre.phoenix6.hardware.Pigeon2;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveRequest;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation;
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation.Alliance;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import frc.robot.generated.TunerConstants;
|
||||||
|
import frc.robot.subsystems.CommandSwerveDrivetrain;
|
||||||
|
import static edu.wpi.first.units.Units.*;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
||||||
|
public class TournerVersMur extends Command {
|
||||||
|
CommandSwerveDrivetrain drivetrain;
|
||||||
|
Optional<Alliance> alliance = DriverStation.getAlliance();
|
||||||
|
private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond);
|
||||||
|
private double MaxAngularRate = RotationsPerSecond.of(0.75).in(RadiansPerSecond);
|
||||||
|
double force;
|
||||||
|
double angle;
|
||||||
|
private final SwerveRequest.FieldCentric drive = new SwerveRequest.FieldCentric()
|
||||||
|
.withDeadband(MaxSpeed * 0.1).withRotationalDeadband(MaxAngularRate * 0.1)
|
||||||
|
.withDriveRequestType(DriveRequestType.OpenLoopVoltage);
|
||||||
|
/** Creates a new TournerAZero. */
|
||||||
|
public TournerVersMur(CommandSwerveDrivetrain drivetrain) {
|
||||||
|
this.drivetrain = drivetrain;
|
||||||
|
addRequirements(drivetrain);
|
||||||
|
// 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() {
|
||||||
|
if(alliance.get() == Alliance.Blue){
|
||||||
|
force = 0.5;
|
||||||
|
angle = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
force = -0.5;
|
||||||
|
angle = 180;
|
||||||
|
}
|
||||||
|
if(drivetrain.getPigeon2().getYaw().getValueAsDouble()>0 && drivetrain.getPigeon2().getYaw().getValueAsDouble()<180){
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(force*180/Math.PI));
|
||||||
|
}
|
||||||
|
else if(drivetrain.getPigeon2().getYaw().getValueAsDouble()>180){
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(-force*180/Math.PI));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 drivetrain.getPigeon2().getYaw().getValueAsDouble()> angle && drivetrain.getPigeon2().getYaw().getValueAsDouble()< angle + 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
// 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.ModeAuto;
|
||||||
|
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveModule.DriveRequestType;
|
||||||
|
import com.ctre.phoenix6.hardware.Pigeon2;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveRequest;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation;
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation.Alliance;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import frc.robot.generated.TunerConstants;
|
||||||
|
import frc.robot.subsystems.CommandSwerveDrivetrain;
|
||||||
|
import static edu.wpi.first.units.Units.*;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
||||||
|
public class TournerVersReservoir extends Command {
|
||||||
|
CommandSwerveDrivetrain drivetrain;
|
||||||
|
Optional<Alliance> alliance = DriverStation.getAlliance();
|
||||||
|
private double MaxSpeed = TunerConstants.kSpeedAt12Volts.in(MetersPerSecond);
|
||||||
|
private double MaxAngularRate = RotationsPerSecond.of(0.75).in(RadiansPerSecond);
|
||||||
|
double force;
|
||||||
|
double angle;
|
||||||
|
private final SwerveRequest.FieldCentric drive = new SwerveRequest.FieldCentric()
|
||||||
|
.withDeadband(MaxSpeed * 0.1).withRotationalDeadband(MaxAngularRate * 0.1)
|
||||||
|
.withDriveRequestType(DriveRequestType.OpenLoopVoltage);
|
||||||
|
/** Creates a new TournerAZero. */
|
||||||
|
public TournerVersReservoir(CommandSwerveDrivetrain drivetrain) {
|
||||||
|
this.drivetrain = drivetrain;
|
||||||
|
addRequirements(drivetrain);
|
||||||
|
// 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() {
|
||||||
|
if(alliance.isPresent()){
|
||||||
|
if(alliance.get() == Alliance.Blue){
|
||||||
|
force = 0.5;
|
||||||
|
angle = 180;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
force = -0.5;
|
||||||
|
angle = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >0 && drivetrain.getPigeon2().getYaw().getValueAsDouble() <180){
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(-force*180/Math.PI));
|
||||||
|
}
|
||||||
|
else if(drivetrain.getPigeon2().getYaw().getValueAsDouble() >180){
|
||||||
|
drivetrain.setControl(drive.withRotationalRate(force*180/Math.PI));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 drivetrain.getPigeon2().getYaw().getValueAsDouble() > angle && drivetrain.getPigeon2().getYaw().getValueAsDouble() < angle + 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,47 +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.Command;
|
|
||||||
import frc.robot.subsystems.Balayeuse;
|
|
||||||
|
|
||||||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
|
||||||
public class MonterBalyeuse extends Command {
|
|
||||||
private Balayeuse balayeuse;
|
|
||||||
/** Creates a new MonterBalyeuse. */
|
|
||||||
public MonterBalyeuse(Balayeuse balayeuse) {
|
|
||||||
this.balayeuse = balayeuse;
|
|
||||||
addRequirements(balayeuse);
|
|
||||||
// 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() {
|
|
||||||
if(!balayeuse.GetLimiSwtich()){
|
|
||||||
balayeuse.Pivoter(0.2);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
balayeuse.Reset();
|
|
||||||
balayeuse.Pivoter(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
|
||||||
@Override
|
|
||||||
public void end(boolean interrupted) {
|
|
||||||
balayeuse.Pivoter(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns true when the command should end.
|
|
||||||
@Override
|
|
||||||
public boolean isFinished() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,42 +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.Command;
|
|
||||||
import frc.robot.subsystems.Grimpeur;
|
|
||||||
|
|
||||||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
|
||||||
public class MonterGrimpeur extends Command {
|
|
||||||
private Grimpeur grimpeur;
|
|
||||||
/** Creates a new MonterGrimpeur. */
|
|
||||||
public MonterGrimpeur(Grimpeur grimpeur) {
|
|
||||||
this.grimpeur = grimpeur;
|
|
||||||
// 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() {
|
|
||||||
if(grimpeur.Position() < grimpeur.PositionFinal()){
|
|
||||||
grimpeur.Grimper(0.5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
|
||||||
@Override
|
|
||||||
public void end(boolean interrupted) {
|
|
||||||
grimpeur.Grimper(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns true when the command should end.
|
|
||||||
@Override
|
|
||||||
public boolean isFinished() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
287
src/main/java/frc/robot/generated/TunerConstants.java
Normal file
287
src/main/java/frc/robot/generated/TunerConstants.java
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
package frc.robot.generated;
|
||||||
|
|
||||||
|
import static edu.wpi.first.units.Units.*;
|
||||||
|
|
||||||
|
import com.ctre.phoenix6.CANBus;
|
||||||
|
import com.ctre.phoenix6.configs.*;
|
||||||
|
import com.ctre.phoenix6.hardware.*;
|
||||||
|
import com.ctre.phoenix6.signals.*;
|
||||||
|
import com.ctre.phoenix6.swerve.*;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveModuleConstants.*;
|
||||||
|
|
||||||
|
import edu.wpi.first.math.Matrix;
|
||||||
|
import edu.wpi.first.math.numbers.N1;
|
||||||
|
import edu.wpi.first.math.numbers.N3;
|
||||||
|
import edu.wpi.first.units.measure.*;
|
||||||
|
|
||||||
|
import frc.robot.subsystems.CommandSwerveDrivetrain;
|
||||||
|
|
||||||
|
// Generated by the 2026 Tuner X Swerve Project Generator
|
||||||
|
// https://v6.docs.ctr-electronics.com/en/stable/docs/tuner/tuner-swerve/index.html
|
||||||
|
public class TunerConstants {
|
||||||
|
// Both sets of gains need to be tuned to your individual robot.
|
||||||
|
|
||||||
|
// The steer motor uses any SwerveModule.SteerRequestType control request with the
|
||||||
|
// output type specified by SwerveModuleConstants.SteerMotorClosedLoopOutput
|
||||||
|
private static final Slot0Configs steerGains = new Slot0Configs()
|
||||||
|
.withKP(100).withKI(0).withKD(0.5)
|
||||||
|
.withKS(0.1).withKV(2.66).withKA(0)
|
||||||
|
.withStaticFeedforwardSign(StaticFeedforwardSignValue.UseClosedLoopSign);
|
||||||
|
// When using closed-loop control, the drive motor uses the control
|
||||||
|
// output type specified by SwerveModuleConstants.DriveMotorClosedLoopOutput
|
||||||
|
private static final Slot0Configs driveGains = new Slot0Configs()
|
||||||
|
.withKP(0.1).withKI(0).withKD(0)
|
||||||
|
.withKS(0).withKV(0.124);
|
||||||
|
|
||||||
|
// The closed-loop output type to use for the steer motors;
|
||||||
|
// This affects the PID/FF gains for the steer motors
|
||||||
|
private static final ClosedLoopOutputType kSteerClosedLoopOutput = ClosedLoopOutputType.Voltage;
|
||||||
|
// The closed-loop output type to use for the drive motors;
|
||||||
|
// This affects the PID/FF gains for the drive motors
|
||||||
|
private static final ClosedLoopOutputType kDriveClosedLoopOutput = ClosedLoopOutputType.Voltage;
|
||||||
|
|
||||||
|
// The type of motor used for the drive motor
|
||||||
|
private static final DriveMotorArrangement kDriveMotorType = DriveMotorArrangement.TalonFX_Integrated;
|
||||||
|
// The type of motor used for the drive motor
|
||||||
|
private static final SteerMotorArrangement kSteerMotorType = SteerMotorArrangement.TalonFX_Integrated;
|
||||||
|
|
||||||
|
// The remote sensor feedback type to use for the steer motors;
|
||||||
|
// When not Pro-licensed, Fused*/Sync* automatically fall back to Remote*
|
||||||
|
private static final SteerFeedbackType kSteerFeedbackType = SteerFeedbackType.FusedCANcoder;
|
||||||
|
|
||||||
|
// The stator current at which the wheels start to slip;
|
||||||
|
// This needs to be tuned to your individual robot
|
||||||
|
private static final Current kSlipCurrent = Amps.of(120);
|
||||||
|
|
||||||
|
// Initial configs for the drive and steer motors and the azimuth encoder; these cannot be null.
|
||||||
|
// Some configs will be overwritten; check the `with*InitialConfigs()` API documentation.
|
||||||
|
private static final TalonFXConfiguration driveInitialConfigs = new TalonFXConfiguration();
|
||||||
|
private static final TalonFXConfiguration steerInitialConfigs = new TalonFXConfiguration()
|
||||||
|
.withCurrentLimits(
|
||||||
|
new CurrentLimitsConfigs()
|
||||||
|
// Swerve azimuth does not require much torque output, so we can set a relatively low
|
||||||
|
// stator current limit to help avoid brownouts without impacting performance.
|
||||||
|
.withStatorCurrentLimit(Amps.of(60))
|
||||||
|
.withStatorCurrentLimitEnable(true)
|
||||||
|
);
|
||||||
|
private static final CANcoderConfiguration encoderInitialConfigs = new CANcoderConfiguration();
|
||||||
|
// Configs for the Pigeon 2; leave this null to skip applying Pigeon 2 configs
|
||||||
|
private static final Pigeon2Configuration pigeonConfigs = null;
|
||||||
|
|
||||||
|
// CAN bus that the devices are located on;
|
||||||
|
// All swerve devices must share the same CAN bus
|
||||||
|
public static final CANBus kCANBus = new CANBus("swerve", "./logs/example.hoot");
|
||||||
|
|
||||||
|
// Theoretical free speed (m/s) at 12 V applied output;
|
||||||
|
// This needs to be tuned to your individual robot
|
||||||
|
public static final LinearVelocity kSpeedAt12Volts = MetersPerSecond.of(9.82);
|
||||||
|
|
||||||
|
// Every 1 rotation of the azimuth results in kCoupleRatio drive motor turns;
|
||||||
|
// This may need to be tuned to your individual robot
|
||||||
|
private static final double kCoupleRatio = 3.5714285714285716;
|
||||||
|
|
||||||
|
private static final double kDriveGearRatio = 6.122448979591837;
|
||||||
|
private static final double kSteerGearRatio = 21.428571428571427;
|
||||||
|
// private static final Distance kWheelRadius = Inches.of(3.895);
|
||||||
|
private static final Distance kWheelRadius = Inches.of(2);
|
||||||
|
|
||||||
|
private static final boolean kInvertLeftSide = false;
|
||||||
|
private static final boolean kInvertRightSide = true;
|
||||||
|
|
||||||
|
private static final int kPigeonId = 16;
|
||||||
|
|
||||||
|
// These are only used for simulation
|
||||||
|
private static final MomentOfInertia kSteerInertia = KilogramSquareMeters.of(0.01);
|
||||||
|
private static final MomentOfInertia kDriveInertia = KilogramSquareMeters.of(0.01);
|
||||||
|
// Simulated voltage necessary to overcome friction
|
||||||
|
private static final Voltage kSteerFrictionVoltage = Volts.of(0.2);
|
||||||
|
private static final Voltage kDriveFrictionVoltage = Volts.of(0.2);
|
||||||
|
|
||||||
|
public static final SwerveDrivetrainConstants DrivetrainConstants = new SwerveDrivetrainConstants()
|
||||||
|
.withCANBusName(kCANBus.getName())
|
||||||
|
.withPigeon2Id(kPigeonId)
|
||||||
|
.withPigeon2Configs(pigeonConfigs);
|
||||||
|
|
||||||
|
private static final SwerveModuleConstantsFactory<TalonFXConfiguration, TalonFXConfiguration, CANcoderConfiguration> ConstantCreator =
|
||||||
|
new SwerveModuleConstantsFactory<TalonFXConfiguration, TalonFXConfiguration, CANcoderConfiguration>()
|
||||||
|
.withDriveMotorGearRatio(kDriveGearRatio)
|
||||||
|
.withSteerMotorGearRatio(kSteerGearRatio)
|
||||||
|
.withCouplingGearRatio(kCoupleRatio)
|
||||||
|
.withWheelRadius(kWheelRadius)
|
||||||
|
.withSteerMotorGains(steerGains)
|
||||||
|
.withDriveMotorGains(driveGains)
|
||||||
|
.withSteerMotorClosedLoopOutput(kSteerClosedLoopOutput)
|
||||||
|
.withDriveMotorClosedLoopOutput(kDriveClosedLoopOutput)
|
||||||
|
.withSlipCurrent(kSlipCurrent)
|
||||||
|
.withSpeedAt12Volts(kSpeedAt12Volts)
|
||||||
|
.withDriveMotorType(kDriveMotorType)
|
||||||
|
.withSteerMotorType(kSteerMotorType)
|
||||||
|
.withFeedbackSource(kSteerFeedbackType)
|
||||||
|
.withDriveMotorInitialConfigs(driveInitialConfigs)
|
||||||
|
.withSteerMotorInitialConfigs(steerInitialConfigs)
|
||||||
|
.withEncoderInitialConfigs(encoderInitialConfigs)
|
||||||
|
.withSteerInertia(kSteerInertia)
|
||||||
|
.withDriveInertia(kDriveInertia)
|
||||||
|
.withSteerFrictionVoltage(kSteerFrictionVoltage)
|
||||||
|
.withDriveFrictionVoltage(kDriveFrictionVoltage);
|
||||||
|
|
||||||
|
|
||||||
|
// Front Left
|
||||||
|
private static final int kFrontLeftDriveMotorId = 6;
|
||||||
|
private static final int kFrontLeftSteerMotorId = 9;
|
||||||
|
private static final int kFrontLeftEncoderId = 24;
|
||||||
|
private static final Angle kFrontLeftEncoderOffset = Rotations.of(-0.36767578125);
|
||||||
|
private static final boolean kFrontLeftSteerMotorInverted = true;
|
||||||
|
private static final boolean kFrontLeftEncoderInverted = false;
|
||||||
|
|
||||||
|
private static final Distance kFrontLeftXPos = Inches.of(11.375);
|
||||||
|
private static final Distance kFrontLeftYPos = Inches.of(10.625);
|
||||||
|
|
||||||
|
// Front Right
|
||||||
|
private static final int kFrontRightDriveMotorId = 7;
|
||||||
|
private static final int kFrontRightSteerMotorId = 5;
|
||||||
|
private static final int kFrontRightEncoderId = 22;
|
||||||
|
private static final Angle kFrontRightEncoderOffset = Rotations.of(0.23486328125);
|
||||||
|
private static final boolean kFrontRightSteerMotorInverted = true;
|
||||||
|
private static final boolean kFrontRightEncoderInverted = false;
|
||||||
|
|
||||||
|
private static final Distance kFrontRightXPos = Inches.of(11.375);
|
||||||
|
private static final Distance kFrontRightYPos = Inches.of(-10.625);
|
||||||
|
|
||||||
|
// Back Left
|
||||||
|
private static final int kBackLeftDriveMotorId = 10;
|
||||||
|
private static final int kBackLeftSteerMotorId = 11;
|
||||||
|
private static final int kBackLeftEncoderId = 21;
|
||||||
|
private static final Angle kBackLeftEncoderOffset = Rotations.of(0.202392578125);
|
||||||
|
private static final boolean kBackLeftSteerMotorInverted = true;
|
||||||
|
private static final boolean kBackLeftEncoderInverted = false;
|
||||||
|
|
||||||
|
private static final Distance kBackLeftXPos = Inches.of(-11.375);
|
||||||
|
private static final Distance kBackLeftYPos = Inches.of(10.625);
|
||||||
|
|
||||||
|
// Back Right
|
||||||
|
private static final int kBackRightDriveMotorId = 14;
|
||||||
|
private static final int kBackRightSteerMotorId = 13;
|
||||||
|
private static final int kBackRightEncoderId = 23;
|
||||||
|
private static final Angle kBackRightEncoderOffset = Rotations.of(-0.33203125);
|
||||||
|
private static final boolean kBackRightSteerMotorInverted = true;
|
||||||
|
private static final boolean kBackRightEncoderInverted = false;
|
||||||
|
|
||||||
|
private static final Distance kBackRightXPos = Inches.of(-11.375);
|
||||||
|
private static final Distance kBackRightYPos = Inches.of(-10.625);
|
||||||
|
|
||||||
|
|
||||||
|
public static final SwerveModuleConstants<TalonFXConfiguration, TalonFXConfiguration, CANcoderConfiguration> FrontLeft =
|
||||||
|
ConstantCreator.createModuleConstants(
|
||||||
|
kFrontLeftSteerMotorId, kFrontLeftDriveMotorId, kFrontLeftEncoderId, kFrontLeftEncoderOffset,
|
||||||
|
kFrontLeftXPos, kFrontLeftYPos, kInvertLeftSide, kFrontLeftSteerMotorInverted, kFrontLeftEncoderInverted
|
||||||
|
);
|
||||||
|
public static final SwerveModuleConstants<TalonFXConfiguration, TalonFXConfiguration, CANcoderConfiguration> FrontRight =
|
||||||
|
ConstantCreator.createModuleConstants(
|
||||||
|
kFrontRightSteerMotorId, kFrontRightDriveMotorId, kFrontRightEncoderId, kFrontRightEncoderOffset,
|
||||||
|
kFrontRightXPos, kFrontRightYPos, kInvertRightSide, kFrontRightSteerMotorInverted, kFrontRightEncoderInverted
|
||||||
|
);
|
||||||
|
public static final SwerveModuleConstants<TalonFXConfiguration, TalonFXConfiguration, CANcoderConfiguration> BackLeft =
|
||||||
|
ConstantCreator.createModuleConstants(
|
||||||
|
kBackLeftSteerMotorId, kBackLeftDriveMotorId, kBackLeftEncoderId, kBackLeftEncoderOffset,
|
||||||
|
kBackLeftXPos, kBackLeftYPos, kInvertLeftSide, kBackLeftSteerMotorInverted, kBackLeftEncoderInverted
|
||||||
|
);
|
||||||
|
public static final SwerveModuleConstants<TalonFXConfiguration, TalonFXConfiguration, CANcoderConfiguration> BackRight =
|
||||||
|
ConstantCreator.createModuleConstants(
|
||||||
|
kBackRightSteerMotorId, kBackRightDriveMotorId, kBackRightEncoderId, kBackRightEncoderOffset,
|
||||||
|
kBackRightXPos, kBackRightYPos, kInvertRightSide, kBackRightSteerMotorInverted, kBackRightEncoderInverted
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a CommandSwerveDrivetrain instance.
|
||||||
|
* This should only be called once in your robot program,.
|
||||||
|
*/
|
||||||
|
public static CommandSwerveDrivetrain createDrivetrain() {
|
||||||
|
return new CommandSwerveDrivetrain(
|
||||||
|
DrivetrainConstants, FrontLeft, FrontRight, BackLeft, BackRight
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Swerve Drive class utilizing CTR Electronics' Phoenix 6 API with the selected device types.
|
||||||
|
*/
|
||||||
|
public static class TunerSwerveDrivetrain extends SwerveDrivetrain<TalonFX, TalonFX, CANcoder> {
|
||||||
|
/**
|
||||||
|
* Constructs a CTRE SwerveDrivetrain using the specified constants.
|
||||||
|
* <p>
|
||||||
|
* This constructs the underlying hardware devices, so users should not construct
|
||||||
|
* the devices themselves. If they need the devices, they can access them through
|
||||||
|
* getters in the classes.
|
||||||
|
*
|
||||||
|
* @param drivetrainConstants Drivetrain-wide constants for the swerve drive
|
||||||
|
* @param modules Constants for each specific module
|
||||||
|
*/
|
||||||
|
public TunerSwerveDrivetrain(
|
||||||
|
SwerveDrivetrainConstants drivetrainConstants,
|
||||||
|
SwerveModuleConstants<?, ?, ?>... modules
|
||||||
|
) {
|
||||||
|
super(
|
||||||
|
TalonFX::new, TalonFX::new, CANcoder::new,
|
||||||
|
drivetrainConstants, modules
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a CTRE SwerveDrivetrain using the specified constants.
|
||||||
|
* <p>
|
||||||
|
* This constructs the underlying hardware devices, so users should not construct
|
||||||
|
* the devices themselves. If they need the devices, they can access them through
|
||||||
|
* getters in the classes.
|
||||||
|
*
|
||||||
|
* @param drivetrainConstants Drivetrain-wide constants for the swerve drive
|
||||||
|
* @param odometryUpdateFrequency The frequency to run the odometry loop. If
|
||||||
|
* unspecified or set to 0 Hz, this is 250 Hz on
|
||||||
|
* CAN FD, and 100 Hz on CAN 2.0.
|
||||||
|
* @param modules Constants for each specific module
|
||||||
|
*/
|
||||||
|
public TunerSwerveDrivetrain(
|
||||||
|
SwerveDrivetrainConstants drivetrainConstants,
|
||||||
|
double odometryUpdateFrequency,
|
||||||
|
SwerveModuleConstants<?, ?, ?>... modules
|
||||||
|
) {
|
||||||
|
super(
|
||||||
|
TalonFX::new, TalonFX::new, CANcoder::new,
|
||||||
|
drivetrainConstants, odometryUpdateFrequency, modules
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a CTRE SwerveDrivetrain using the specified constants.
|
||||||
|
* <p>
|
||||||
|
* This constructs the underlying hardware devices, so users should not construct
|
||||||
|
* the devices themselves. If they need the devices, they can access them through
|
||||||
|
* getters in the classes.
|
||||||
|
*
|
||||||
|
* @param drivetrainConstants Drivetrain-wide constants for the swerve drive
|
||||||
|
* @param odometryUpdateFrequency The frequency to run the odometry loop. If
|
||||||
|
* unspecified or set to 0 Hz, this is 250 Hz on
|
||||||
|
* CAN FD, and 100 Hz on CAN 2.0.
|
||||||
|
* @param odometryStandardDeviation The standard deviation for odometry calculation
|
||||||
|
* in the form [x, y, theta]ᵀ, with units in meters
|
||||||
|
* and radians
|
||||||
|
* @param visionStandardDeviation The standard deviation for vision calculation
|
||||||
|
* in the form [x, y, theta]ᵀ, with units in meters
|
||||||
|
* and radians
|
||||||
|
* @param modules Constants for each specific module
|
||||||
|
*/
|
||||||
|
public TunerSwerveDrivetrain(
|
||||||
|
SwerveDrivetrainConstants drivetrainConstants,
|
||||||
|
double odometryUpdateFrequency,
|
||||||
|
Matrix<N3, N1> odometryStandardDeviation,
|
||||||
|
Matrix<N3, N1> visionStandardDeviation,
|
||||||
|
SwerveModuleConstants<?, ?, ?>... modules
|
||||||
|
) {
|
||||||
|
super(
|
||||||
|
TalonFX::new, TalonFX::new, CANcoder::new,
|
||||||
|
drivetrainConstants, odometryUpdateFrequency,
|
||||||
|
odometryStandardDeviation, visionStandardDeviation, modules
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,55 +5,42 @@
|
|||||||
package frc.robot.subsystems;
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
import com.revrobotics.spark.SparkFlex;
|
import com.revrobotics.spark.SparkFlex;
|
||||||
import com.revrobotics.spark.SparkMax;
|
|
||||||
import com.revrobotics.spark.SparkLowLevel.MotorType;
|
import com.revrobotics.spark.SparkLowLevel.MotorType;
|
||||||
|
|
||||||
import edu.wpi.first.networktables.GenericEntry;
|
|
||||||
import edu.wpi.first.units.measure.Time;
|
|
||||||
import edu.wpi.first.wpilibj.DigitalInput;
|
|
||||||
import edu.wpi.first.wpilibj.Timer;
|
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
|
||||||
public class Balayeuse extends SubsystemBase {
|
public class Balayeuse extends SubsystemBase {
|
||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
SparkFlex Balaye1 = new SparkFlex(5, MotorType.kBrushless);
|
SparkFlex moteurBas = new SparkFlex(2, MotorType.kBrushless);
|
||||||
SparkFlex Balaye2 = new SparkFlex(6, MotorType.kBrushless);
|
SparkFlex moteurHaut = new SparkFlex(20, MotorType.kBrushless);
|
||||||
SparkMax Pivot = new SparkMax(7, MotorType.kBrushless);
|
|
||||||
DigitalInput limit = new DigitalInput(0);
|
private final double vitesseMoteurBas = -0.5;
|
||||||
private GenericEntry EncodeurBalayeuse =
|
private final double vitesseMoteurHaut = -0.2;
|
||||||
teb.add("Position bas balayeuse", 10).getEntry();
|
|
||||||
public void Balayer(double vitesse){
|
public Command balaye(double vitesseBas, double vitesseHaut) {
|
||||||
Balaye1.set(vitesse);
|
return startEnd(
|
||||||
Balaye2.set(vitesse);
|
() -> {
|
||||||
|
moteurBas.set(vitesseBas);
|
||||||
|
moteurHaut.set(vitesseHaut);
|
||||||
|
}, () -> {
|
||||||
|
moteurBas.set(0);
|
||||||
|
moteurHaut.set(0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
public void Pivoter(double vitesse){
|
|
||||||
Pivot.set(vitesse);
|
public Command aspirer() {
|
||||||
|
return balaye(vitesseMoteurBas, vitesseMoteurHaut);
|
||||||
}
|
}
|
||||||
public double Distance(){
|
|
||||||
return Pivot.getEncoder().getPosition();
|
public Command ejecter() {
|
||||||
}
|
return balaye(-vitesseMoteurBas, -vitesseMoteurHaut);
|
||||||
public void Reset(){
|
|
||||||
Pivot.getEncoder().setPosition(0);
|
|
||||||
}
|
|
||||||
public boolean GetLimiSwtich(){
|
|
||||||
return limit.get();
|
|
||||||
}
|
|
||||||
public double Amp(){
|
|
||||||
return Balaye2.getOutputCurrent();
|
|
||||||
}
|
|
||||||
public void Temps(){
|
|
||||||
Timer timer = new Timer();
|
|
||||||
timer.start();
|
|
||||||
}
|
|
||||||
public double EncodeurBalayeuse(){
|
|
||||||
return EncodeurBalayeuse.getDouble(10);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Creates a new Balayeuse. */
|
/** Creates a new Balayeuse. */
|
||||||
public Balayeuse() {
|
public Balayeuse() {
|
||||||
teb.addBoolean("limit balayeuse", this::GetLimiSwtich);
|
|
||||||
teb.addDouble("encodeur balayeuse", this::Distance);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
375
src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java
Normal file
375
src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java
Normal file
@@ -0,0 +1,375 @@
|
|||||||
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
|
import static edu.wpi.first.units.Units.Degrees;
|
||||||
|
import static edu.wpi.first.units.Units.Second;
|
||||||
|
import static edu.wpi.first.units.Units.Volts;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.ctre.phoenix6.SignalLogger;
|
||||||
|
import com.ctre.phoenix6.Utils;
|
||||||
|
import com.ctre.phoenix6.hardware.Pigeon2;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveDrivetrainConstants;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveModule.DriveRequestType;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveModuleConstants;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveRequest;
|
||||||
|
import com.ctre.phoenix6.swerve.SwerveRequest.FieldCentricFacingAngle;
|
||||||
|
import com.pathplanner.lib.auto.AutoBuilder;
|
||||||
|
import com.pathplanner.lib.config.PIDConstants;
|
||||||
|
import com.pathplanner.lib.config.RobotConfig;
|
||||||
|
import com.pathplanner.lib.controllers.PPHolonomicDriveController;
|
||||||
|
|
||||||
|
import edu.wpi.first.math.Matrix;
|
||||||
|
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.math.kinematics.ChassisSpeeds;
|
||||||
|
import edu.wpi.first.math.numbers.N1;
|
||||||
|
import edu.wpi.first.math.numbers.N3;
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation;
|
||||||
|
import edu.wpi.first.wpilibj.DriverStation.Alliance;
|
||||||
|
import edu.wpi.first.wpilibj.Notifier;
|
||||||
|
import edu.wpi.first.wpilibj.RobotController;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Subsystem;
|
||||||
|
import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine;
|
||||||
|
import frc.robot.Coordinates;
|
||||||
|
import frc.robot.generated.TunerConstants.TunerSwerveDrivetrain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class that extends the Phoenix 6 SwerveDrivetrain class and implements
|
||||||
|
* Subsystem so it can easily be used in command-based projects.
|
||||||
|
*
|
||||||
|
* Generated by the 2026 Tuner X Swerve Project Generator
|
||||||
|
* https://v6.docs.ctr-electronics.com/en/stable/docs/tuner/tuner-swerve/index.html
|
||||||
|
*/
|
||||||
|
public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Subsystem {
|
||||||
|
private static final double kSimLoopPeriod = 0.004; // 4 ms
|
||||||
|
private Notifier m_simNotifier = null;
|
||||||
|
private double m_lastSimTime;
|
||||||
|
Pigeon2 pigeon2;
|
||||||
|
|
||||||
|
/* Blue alliance sees forward as 0 degrees (toward red alliance wall) */
|
||||||
|
private static final Rotation2d kBlueAlliancePerspectiveRotation = Rotation2d.kZero;
|
||||||
|
/* Red alliance sees forward as 180 degrees (toward blue alliance wall) */
|
||||||
|
private static final Rotation2d kRedAlliancePerspectiveRotation = Rotation2d.k180deg;
|
||||||
|
/* Keep track if we've ever applied the operator perspective before or not */
|
||||||
|
private boolean m_hasAppliedOperatorPerspective = false;
|
||||||
|
/* Swerve requests to apply during SysId characterization */
|
||||||
|
private final SwerveRequest.SysIdSwerveTranslation m_translationCharacterization = new SwerveRequest.SysIdSwerveTranslation();
|
||||||
|
private final SwerveRequest.SysIdSwerveSteerGains m_steerCharacterization = new SwerveRequest.SysIdSwerveSteerGains();
|
||||||
|
private final SwerveRequest.SysIdSwerveRotation m_rotationCharacterization = new SwerveRequest.SysIdSwerveRotation();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SysId routine for characterizing translation. This is used to find PID gains
|
||||||
|
* for the drive motors.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private final SysIdRoutine m_sysIdRoutineTranslation = new SysIdRoutine(
|
||||||
|
new SysIdRoutine.Config(
|
||||||
|
null, // Use default ramp rate (1 V/s)
|
||||||
|
Volts.of(4), // Reduce dynamic step voltage to 4 V to prevent brownout
|
||||||
|
null, // Use default timeout (10 s)
|
||||||
|
// Log state with SignalLogger class
|
||||||
|
state -> SignalLogger.writeString("SysIdTranslation_State", state.toString())),
|
||||||
|
new SysIdRoutine.Mechanism(
|
||||||
|
output -> setControl(m_translationCharacterization.withVolts(output)),
|
||||||
|
null,
|
||||||
|
this));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SysId routine for characterizing steer. This is used to find PID gains for
|
||||||
|
* the steer motors.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private final SysIdRoutine m_sysIdRoutineSteer = new SysIdRoutine(
|
||||||
|
new SysIdRoutine.Config(
|
||||||
|
null, // Use default ramp rate (1 V/s)
|
||||||
|
Volts.of(7), // Use dynamic voltage of 7 V
|
||||||
|
null, // Use default timeout (10 s)
|
||||||
|
// Log state with SignalLogger class
|
||||||
|
state -> SignalLogger.writeString("SysIdSteer_State", state.toString())),
|
||||||
|
new SysIdRoutine.Mechanism(
|
||||||
|
volts -> setControl(m_steerCharacterization.withVolts(volts)),
|
||||||
|
null,
|
||||||
|
this));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SysId routine for characterizing rotation.
|
||||||
|
* This is used to find PID gains for the FieldCentricFacingAngle
|
||||||
|
* HeadingController.
|
||||||
|
* See the documentation of SwerveRequest.SysIdSwerveRotation for info on
|
||||||
|
* importing the log to SysId.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private final SysIdRoutine m_sysIdRoutineRotation = new SysIdRoutine(
|
||||||
|
new SysIdRoutine.Config(
|
||||||
|
/* This is in radians per second², but SysId only supports "volts per second" */
|
||||||
|
Volts.of(Math.PI / 6).per(Second),
|
||||||
|
/* This is in radians per second, but SysId only supports "volts" */
|
||||||
|
Volts.of(Math.PI),
|
||||||
|
null, // Use default timeout (10 s)
|
||||||
|
// Log state with SignalLogger class
|
||||||
|
state -> SignalLogger.writeString("SysIdRotation_State", state.toString())),
|
||||||
|
new SysIdRoutine.Mechanism(
|
||||||
|
output -> {
|
||||||
|
/* output is actually radians per second, but SysId only supports "volts" */
|
||||||
|
setControl(m_rotationCharacterization.withRotationalRate(output.in(Volts)));
|
||||||
|
/* also log the requested output for SysId */
|
||||||
|
SignalLogger.writeDouble("Rotational_Rate", output.in(Volts));
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
this));
|
||||||
|
|
||||||
|
private final SwerveRequest.ApplyRobotSpeeds m_pathApplyRobotSpeeds = new SwerveRequest.ApplyRobotSpeeds();
|
||||||
|
|
||||||
|
private void configureAutoBuilder() {
|
||||||
|
try {
|
||||||
|
RobotConfig config = RobotConfig.fromGUISettings();
|
||||||
|
AutoBuilder.configure(
|
||||||
|
() -> getState().Pose,
|
||||||
|
this::resetPose,
|
||||||
|
() -> getState().Speeds,
|
||||||
|
(speeds, feedforwards) -> setControl(
|
||||||
|
m_pathApplyRobotSpeeds.withSpeeds(ChassisSpeeds.discretize(speeds, 0.020))
|
||||||
|
.withWheelForceFeedforwardsX(feedforwards.robotRelativeForcesXNewtons())
|
||||||
|
.withWheelForceFeedforwardsY(feedforwards.robotRelativeForcesYNewtons())),
|
||||||
|
new PPHolonomicDriveController(
|
||||||
|
new PIDConstants(10, 0, 0),
|
||||||
|
new PIDConstants(7, 0, 0)),
|
||||||
|
config,
|
||||||
|
() -> DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Red,
|
||||||
|
this);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
DriverStation.reportError("Failed to load PathPlanner config and configure AutoBuilder",
|
||||||
|
ex.getStackTrace());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a CTRE SwerveDrivetrain using the specified constants.
|
||||||
|
* <p>
|
||||||
|
* This constructs the underlying hardware devices, so users should not
|
||||||
|
* construct
|
||||||
|
* the devices themselves. If they need the devices, they can access them
|
||||||
|
* through
|
||||||
|
* getters in the classes.
|
||||||
|
*
|
||||||
|
* @param drivetrainConstants Drivetrain-wide constants for the swerve drive
|
||||||
|
* @param modules Constants for each specific module
|
||||||
|
*/
|
||||||
|
public CommandSwerveDrivetrain(
|
||||||
|
SwerveDrivetrainConstants drivetrainConstants,
|
||||||
|
SwerveModuleConstants<?, ?, ?>... modules) {
|
||||||
|
super(drivetrainConstants, modules);
|
||||||
|
if (Utils.isSimulation()) {
|
||||||
|
startSimThread();
|
||||||
|
}
|
||||||
|
configureAutoBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a CTRE SwerveDrivetrain using the specified constants.
|
||||||
|
* <p>
|
||||||
|
* This constructs the underlying hardware devices, so users should not
|
||||||
|
* construct
|
||||||
|
* the devices themselves. If they need the devices, they can access them
|
||||||
|
* through
|
||||||
|
* getters in the classes.
|
||||||
|
*
|
||||||
|
* @param drivetrainConstants Drivetrain-wide constants for the swerve drive
|
||||||
|
* @param odometryUpdateFrequency The frequency to run the odometry loop. If
|
||||||
|
* unspecified or set to 0 Hz, this is 250 Hz on
|
||||||
|
* CAN FD, and 100 Hz on CAN 2.0.
|
||||||
|
* @param modules Constants for each specific module
|
||||||
|
*/
|
||||||
|
public CommandSwerveDrivetrain(
|
||||||
|
SwerveDrivetrainConstants drivetrainConstants,
|
||||||
|
double odometryUpdateFrequency,
|
||||||
|
SwerveModuleConstants<?, ?, ?>... modules) {
|
||||||
|
super(drivetrainConstants, odometryUpdateFrequency, modules);
|
||||||
|
if (Utils.isSimulation()) {
|
||||||
|
startSimThread();
|
||||||
|
}
|
||||||
|
configureAutoBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a CTRE SwerveDrivetrain using the specified constants.
|
||||||
|
* <p>
|
||||||
|
* This constructs the underlying hardware devices, so users should not
|
||||||
|
* construct
|
||||||
|
* the devices themselves. If they need the devices, they can access them
|
||||||
|
* through
|
||||||
|
* getters in the classes.
|
||||||
|
*
|
||||||
|
* @param drivetrainConstants Drivetrain-wide constants for the swerve
|
||||||
|
* drive
|
||||||
|
* @param odometryUpdateFrequency The frequency to run the odometry loop. If
|
||||||
|
* unspecified or set to 0 Hz, this is 250 Hz
|
||||||
|
* on
|
||||||
|
* CAN FD, and 100 Hz on CAN 2.0.
|
||||||
|
* @param odometryStandardDeviation The standard deviation for odometry
|
||||||
|
* calculation
|
||||||
|
* in the form [x, y, theta]ᵀ, with units in
|
||||||
|
* meters
|
||||||
|
* and radians
|
||||||
|
* @param visionStandardDeviation The standard deviation for vision
|
||||||
|
* calculation
|
||||||
|
* in the form [x, y, theta]ᵀ, with units in
|
||||||
|
* meters
|
||||||
|
* and radians
|
||||||
|
* @param modules Constants for each specific module
|
||||||
|
*/
|
||||||
|
public CommandSwerveDrivetrain(
|
||||||
|
SwerveDrivetrainConstants drivetrainConstants,
|
||||||
|
double odometryUpdateFrequency,
|
||||||
|
Matrix<N3, N1> odometryStandardDeviation,
|
||||||
|
Matrix<N3, N1> visionStandardDeviation,
|
||||||
|
SwerveModuleConstants<?, ?, ?>... modules) {
|
||||||
|
super(drivetrainConstants, odometryUpdateFrequency, odometryStandardDeviation, visionStandardDeviation,
|
||||||
|
modules);
|
||||||
|
if (Utils.isSimulation()) {
|
||||||
|
startSimThread();
|
||||||
|
}
|
||||||
|
configureAutoBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a command that applies the specified control request to this swerve
|
||||||
|
* drivetrain.
|
||||||
|
*
|
||||||
|
* @param request Function returning the request to apply
|
||||||
|
* @return Command to run
|
||||||
|
*/
|
||||||
|
public Command applyRequest(Supplier<SwerveRequest> request) {
|
||||||
|
return run(() -> this.setControl(request.get()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void periodic() {
|
||||||
|
/*
|
||||||
|
* Periodically try to apply the operator perspective.
|
||||||
|
* If we haven't applied the operator perspective before, then we should apply
|
||||||
|
* it regardless of DS state.
|
||||||
|
* This allows us to correct the perspective in case the robot code restarts
|
||||||
|
* mid-match.
|
||||||
|
* Otherwise, only check and apply the operator perspective if the DS is
|
||||||
|
* disabled.
|
||||||
|
* This ensures driving behavior doesn't change until an explicit disable event
|
||||||
|
* occurs during testing.
|
||||||
|
*/
|
||||||
|
if (!m_hasAppliedOperatorPerspective || DriverStation.isDisabled()) {
|
||||||
|
DriverStation.getAlliance().ifPresent(allianceColor -> {
|
||||||
|
setOperatorPerspectiveForward(
|
||||||
|
allianceColor == Alliance.Red
|
||||||
|
? kRedAlliancePerspectiveRotation
|
||||||
|
: kBlueAlliancePerspectiveRotation);
|
||||||
|
m_hasAppliedOperatorPerspective = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startSimThread() {
|
||||||
|
m_lastSimTime = Utils.getCurrentTimeSeconds();
|
||||||
|
|
||||||
|
/* Run simulation at a faster rate so PID gains behave more reasonably */
|
||||||
|
m_simNotifier = new Notifier(() -> {
|
||||||
|
final double currentTime = Utils.getCurrentTimeSeconds();
|
||||||
|
double deltaTime = currentTime - m_lastSimTime;
|
||||||
|
m_lastSimTime = currentTime;
|
||||||
|
|
||||||
|
/* use the measured time delta, get battery voltage from WPILib */
|
||||||
|
updateSimState(deltaTime, RobotController.getBatteryVoltage());
|
||||||
|
});
|
||||||
|
m_simNotifier.startPeriodic(kSimLoopPeriod);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a vision measurement to the Kalman Filter. This will correct the
|
||||||
|
* odometry pose estimate
|
||||||
|
* while still accounting for measurement noise.
|
||||||
|
*
|
||||||
|
* @param visionRobotPoseMeters The pose of the robot as measured by the vision
|
||||||
|
* camera.
|
||||||
|
* @param timestampSeconds The timestamp of the vision measurement in
|
||||||
|
* seconds.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addVisionMeasurement(Pose2d visionRobotPoseMeters, double timestampSeconds) {
|
||||||
|
super.addVisionMeasurement(visionRobotPoseMeters, Utils.fpgaToCurrentTime(timestampSeconds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a vision measurement to the Kalman Filter. This will correct the
|
||||||
|
* odometry pose estimate
|
||||||
|
* while still accounting for measurement noise.
|
||||||
|
* <p>
|
||||||
|
* Note that the vision measurement standard deviations passed into this method
|
||||||
|
* will continue to apply to future measurements until a subsequent call to
|
||||||
|
* {@link #setVisionMeasurementStdDevs(Matrix)} or this method.
|
||||||
|
*
|
||||||
|
* @param visionRobotPoseMeters The pose of the robot as measured by the
|
||||||
|
* vision camera.
|
||||||
|
* @param timestampSeconds The timestamp of the vision measurement in
|
||||||
|
* seconds.
|
||||||
|
* @param visionMeasurementStdDevs Standard deviations of the vision pose
|
||||||
|
* measurement
|
||||||
|
* in the form [x, y, theta]ᵀ, with units in
|
||||||
|
* meters and radians.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addVisionMeasurement(
|
||||||
|
Pose2d visionRobotPoseMeters,
|
||||||
|
double timestampSeconds,
|
||||||
|
Matrix<N3, N1> visionMeasurementStdDevs) {
|
||||||
|
super.addVisionMeasurement(visionRobotPoseMeters, Utils.fpgaToCurrentTime(timestampSeconds),
|
||||||
|
visionMeasurementStdDevs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the pose at a given timestamp, if the buffer is not empty.
|
||||||
|
*
|
||||||
|
* @param timestampSeconds The timestamp of the pose in seconds.
|
||||||
|
* @return The pose at the given timestamp (or Optional.empty() if the buffer is
|
||||||
|
* empty).
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Optional<Pose2d> samplePoseAt(double timestampSeconds) {
|
||||||
|
return super.samplePoseAt(Utils.fpgaToCurrentTime(timestampSeconds));
|
||||||
|
}
|
||||||
|
|
||||||
|
private SwerveRequest.FieldCentricFacingAngle fieldCentricFacingAngle = new FieldCentricFacingAngle()
|
||||||
|
.withDriveRequestType(DriveRequestType.OpenLoopVoltage).withHeadingPID(7, 0, 0);
|
||||||
|
|
||||||
|
public Command viserReservoir(Supplier<Double> velocityX, Supplier<Double> velocityY) {
|
||||||
|
return runEnd(() -> {
|
||||||
|
Translation2d diff = Coordinates.diffFromHub(getState().Pose.getTranslation());
|
||||||
|
Rotation2d angle = diff.getAngle();
|
||||||
|
setControl(fieldCentricFacingAngle
|
||||||
|
.withTargetDirection(angle)
|
||||||
|
.withVelocityX(velocityX.get())
|
||||||
|
.withVelocityY(velocityY.get()));
|
||||||
|
}, () -> setControl(fieldCentricFacingAngle.withVelocityX(0).withVelocityY(0)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command allerGrimper(Supplier<Translation2d> diffSupplier) {
|
||||||
|
return runEnd(() -> {
|
||||||
|
Translation2d diff = diffSupplier.get();
|
||||||
|
Rotation2d angle = diff.getAngle().rotateBy(new Rotation2d(Degrees.of(-90)));
|
||||||
|
setControl(fieldCentricFacingAngle
|
||||||
|
.withTargetDirection(angle)
|
||||||
|
.withVelocityX(diff.getX())
|
||||||
|
.withVelocityY(diff.getY()));
|
||||||
|
}, () -> setControl(fieldCentricFacingAngle.withVelocityX(0).withVelocityY(0)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command allerGrimpeMur() {
|
||||||
|
return allerGrimper(() -> Coordinates.diffFromGrimpeMur(getState().Pose.getTranslation()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command allerGrimpeDepot() {
|
||||||
|
return allerGrimper(() -> Coordinates.diffFromGrimpeDepot(getState().Pose.getTranslation()));
|
||||||
|
}
|
||||||
|
}
|
||||||
33
src/main/java/frc/robot/subsystems/Demeleur.java
Normal file
33
src/main/java/frc/robot/subsystems/Demeleur.java
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
// 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.subsystems;
|
||||||
|
|
||||||
|
import com.revrobotics.spark.SparkLowLevel.MotorType;
|
||||||
|
import com.revrobotics.spark.SparkMax;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
|
||||||
|
public class Demeleur extends SubsystemBase {
|
||||||
|
|
||||||
|
SparkMax moteur = new SparkMax(19, MotorType.kBrushless);
|
||||||
|
|
||||||
|
/** Creates a new Demeleur. */
|
||||||
|
public Demeleur() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command run() {
|
||||||
|
return startEnd(() -> moteur.set(1), () -> moteur.set(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command inverse() {
|
||||||
|
return startEnd(() -> moteur.set(-0.2), () -> moteur.set(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void periodic() {
|
||||||
|
// This method will be called once per scheduler run
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,48 +4,76 @@
|
|||||||
|
|
||||||
package frc.robot.subsystems;
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
import com.revrobotics.spark.SparkMax;
|
import com.revrobotics.PersistMode;
|
||||||
import com.revrobotics.spark.config.SparkMaxConfig;
|
import com.revrobotics.RelativeEncoder;
|
||||||
|
import com.revrobotics.ResetMode;
|
||||||
import com.revrobotics.spark.SparkLowLevel.MotorType;
|
import com.revrobotics.spark.SparkLowLevel.MotorType;
|
||||||
|
import com.revrobotics.spark.SparkMax;
|
||||||
|
import com.revrobotics.spark.config.SoftLimitConfig;
|
||||||
|
import com.revrobotics.spark.config.SparkBaseConfig;
|
||||||
|
import com.revrobotics.spark.config.SparkBaseConfig.IdleMode;
|
||||||
|
import com.revrobotics.spark.config.SparkMaxConfig;
|
||||||
|
|
||||||
import edu.wpi.first.networktables.GenericEntry;
|
import edu.wpi.first.networktables.GenericEntry;
|
||||||
import edu.wpi.first.wpilibj.DigitalInput;
|
import edu.wpi.first.wpilibj.DigitalInput;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
|
||||||
public class Grimpeur extends SubsystemBase {
|
public class Grimpeur extends SubsystemBase {
|
||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
SparkMax grimpeur1 = new SparkMax(8,MotorType.kBrushless);
|
SparkMax moteur1 = new SparkMax(3, MotorType.kBrushless);
|
||||||
SparkMax grimpeur2 = new SparkMax(9,MotorType.kBrushless);
|
SparkMax moteur2 = new SparkMax(12, MotorType.kBrushless);
|
||||||
SparkMaxConfig slaveConfig = new SparkMaxConfig();
|
RelativeEncoder encoder1 = moteur1.getEncoder();
|
||||||
DigitalInput limit = new DigitalInput(1);
|
RelativeEncoder encoder2 = moteur2.getEncoder();
|
||||||
private GenericEntry EncodeurGrimpeur =
|
|
||||||
teb.add("Position haut grimpeur", 10).getEntry();
|
private double vitesseSortir = 0.5;
|
||||||
public void Grimper(double vitesse){
|
private double vitesseEntrer = -0.4;
|
||||||
grimpeur1.set(vitesse);
|
|
||||||
grimpeur2.set(vitesse);
|
private GenericEntry ntEncodeurGrimpeur = teb.add("Position haut grimpeur", 101).getEntry();
|
||||||
}
|
|
||||||
public double Position(){
|
private double maxEncodeur = ntEncodeurGrimpeur.getDouble(101);
|
||||||
return grimpeur1.getEncoder().getPosition();
|
|
||||||
}
|
DigitalInput limit = new DigitalInput(0);
|
||||||
public void Reset(){
|
|
||||||
grimpeur1.getEncoder().setPosition(0);
|
|
||||||
}
|
|
||||||
public boolean Limit(){
|
|
||||||
return limit.get();
|
|
||||||
}
|
|
||||||
public double PositionFinal(){
|
|
||||||
return EncodeurGrimpeur.getDouble(10);
|
|
||||||
}
|
|
||||||
/** Creates a new Grimpeur. */
|
|
||||||
public Grimpeur() {
|
public Grimpeur() {
|
||||||
teb.addDouble("encodeur grimpeur", this::Position);
|
teb.addDouble("encodeur grimpeur", encoder1::getPosition);
|
||||||
teb.addBoolean("limit grimpeur", this::Limit);
|
teb.addBoolean("limit grimpeur", limit::get);
|
||||||
|
configMoteurs();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configMoteurs() {
|
||||||
|
SparkBaseConfig configMoteur = new SparkMaxConfig().apply(
|
||||||
|
new SoftLimitConfig().forwardSoftLimit(maxEncodeur).forwardSoftLimitEnabled(true)
|
||||||
|
.reverseSoftLimit(0).reverseSoftLimitEnabled(true))
|
||||||
|
.openLoopRampRate(0.1)
|
||||||
|
.idleMode(IdleMode.kBrake);
|
||||||
|
moteur1.configure(configMoteur, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
|
||||||
|
moteur2.configure(configMoteur.follow(moteur1), ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command sortir() {
|
||||||
|
return startEnd(() -> moteur1.set(vitesseSortir), () -> moteur1.set(0))
|
||||||
|
.until(() -> moteur1.getForwardSoftLimit().isReached() || moteur2.getForwardSoftLimit().isReached());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command rentrer() {
|
||||||
|
return startEnd(() -> moteur1.set(vitesseEntrer), () -> moteur1.set(0))
|
||||||
|
.until(() -> moteur1.getReverseSoftLimit().isReached() || moteur2.getReverseSoftLimit().isReached());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
// This method will be called once per scheduler run
|
if (limit.get()) {
|
||||||
|
encoder1.setPosition(0);
|
||||||
|
encoder2.setPosition(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
double newEncoderMax = ntEncodeurGrimpeur.getDouble(maxEncodeur);
|
||||||
|
if (newEncoderMax != maxEncodeur) {
|
||||||
|
maxEncodeur = newEncoderMax;
|
||||||
|
configMoteurs();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,40 +4,71 @@
|
|||||||
|
|
||||||
package frc.robot.subsystems;
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.revrobotics.PersistMode;
|
||||||
|
import com.revrobotics.RelativeEncoder;
|
||||||
|
import com.revrobotics.ResetMode;
|
||||||
|
import com.revrobotics.spark.SparkBase.ControlType;
|
||||||
import com.revrobotics.spark.SparkFlex;
|
import com.revrobotics.spark.SparkFlex;
|
||||||
import com.revrobotics.spark.SparkLowLevel.MotorType;
|
import com.revrobotics.spark.SparkLowLevel.MotorType;
|
||||||
|
import com.revrobotics.spark.config.ClosedLoopConfig;
|
||||||
|
import com.revrobotics.spark.config.SparkBaseConfig;
|
||||||
|
import com.revrobotics.spark.config.SparkBaseConfig.IdleMode;
|
||||||
|
import com.revrobotics.spark.config.SparkMaxConfig;
|
||||||
|
|
||||||
import edu.wpi.first.networktables.GenericEntry;
|
import edu.wpi.first.networktables.GenericEntry;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
|
||||||
public class Lanceur extends SubsystemBase {
|
public class Lanceur extends SubsystemBase {
|
||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
SparkFlex moteur1 = new SparkFlex(2, MotorType.kBrushless);
|
|
||||||
SparkFlex moteur2 = new SparkFlex(3, MotorType.kBrushless);
|
SparkFlex moteur1 = new SparkFlex(15, MotorType.kBrushless);
|
||||||
SparkFlex Demeleur = new SparkFlex(4, MotorType.kBrushless);
|
SparkFlex moteur2 = new SparkFlex(18, MotorType.kBrushless);
|
||||||
GenericEntry vitesse =
|
|
||||||
teb.add("vitesse lanceur",100).getEntry();
|
RelativeEncoder encoder = moteur1.getEncoder();
|
||||||
public void Lancer(double vitesse){
|
|
||||||
moteur1.set(vitesse);
|
GenericEntry vitesse = teb.add("vitesse lanceur", 4000).getEntry();
|
||||||
moteur2.set(-vitesse);
|
GenericEntry AmpLanceur = teb.add("ampérage lanceur", 30).getEntry();
|
||||||
}
|
|
||||||
public void Demeler(double vitesse){
|
|
||||||
Demeleur.set(vitesse);
|
|
||||||
}
|
|
||||||
public double Vitesse(){
|
|
||||||
return moteur1.getEncoder().getVelocity();
|
|
||||||
}
|
|
||||||
public double Amp(){
|
|
||||||
return moteur1.getOutputCurrent();
|
|
||||||
}
|
|
||||||
public double vitesseDemander(){
|
|
||||||
return vitesse.getDouble(100);
|
|
||||||
}
|
|
||||||
/** Creates a new Lanceur. */
|
/** Creates a new Lanceur. */
|
||||||
public Lanceur() {
|
public Lanceur() {
|
||||||
teb.addDouble("amperage lanceur", this::Amp);
|
teb.addDouble("amperage lanceur", moteur1::getOutputCurrent);
|
||||||
|
teb.addDouble("vitesse actuelle", encoder::getVelocity);
|
||||||
|
configMoteurs();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configMoteurs() {
|
||||||
|
SparkBaseConfig configMoteur = new SparkMaxConfig().apply(
|
||||||
|
new ClosedLoopConfig().pid(0.0007, 0, 0))
|
||||||
|
.openLoopRampRate(0.1)
|
||||||
|
.idleMode(IdleMode.kCoast);
|
||||||
|
moteur1.configure(configMoteur, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
|
||||||
|
moteur2.configure(configMoteur.follow(moteur1), ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command lancer(Supplier<Double> vitesse) {
|
||||||
|
return runEnd(() -> moteur1.getClosedLoopController().setSetpoint(vitesse.get(), ControlType.kVelocity),
|
||||||
|
() -> moteur1.set(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command inverse() {
|
||||||
|
return startEnd(() -> moteur1.set(-0.2), () -> moteur1.set(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getVitesse() {
|
||||||
|
return encoder.getVelocity();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean setPointAtteint() {
|
||||||
|
return getVitesse() >= moteur1.getClosedLoopController().getSetpoint() * 0.95;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double ntBasseVitesse() {
|
||||||
|
return vitesse.getDouble(4000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -45,4 +76,3 @@ public class Lanceur extends SubsystemBase {
|
|||||||
// This method will be called once per scheduler run
|
// This method will be called once per scheduler run
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
package frc.robot.subsystems;
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import com.ctre.phoenix.led.CANdle;
|
import com.ctre.phoenix.led.CANdle;
|
||||||
import com.ctre.phoenix.led.RainbowAnimation;
|
import com.ctre.phoenix.led.RainbowAnimation;
|
||||||
|
|
||||||
@@ -20,67 +18,76 @@ public class Led extends SubsystemBase {
|
|||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
private GenericEntry equipe =
|
private GenericEntry equipe =
|
||||||
teb.add("equipe commence (bleu = ouvert, rouge = fermé)", true).withWidget(BuiltInWidgets.kToggleSwitch).getEntry();
|
teb.add("equipe commence (bleu = ouvert, rouge = fermé)", true).withWidget(BuiltInWidgets.kToggleSwitch).getEntry();
|
||||||
CANdle CANDle = new CANdle(7);
|
@SuppressWarnings("removal")
|
||||||
|
CANdle CANDle = new CANdle(17);
|
||||||
|
@SuppressWarnings("removal")
|
||||||
RainbowAnimation rainbowAnim = new RainbowAnimation();
|
RainbowAnimation rainbowAnim = new RainbowAnimation();
|
||||||
|
@SuppressWarnings("removal")
|
||||||
public void bleu(){
|
public void bleu(){
|
||||||
CANDle.setLEDs(0, 0, 255,0,0,8);
|
CANDle.setLEDs(0, 0, 255,0,0,8);
|
||||||
CANDle.setLEDs(0, 0, 255,0,16,8);
|
CANDle.setLEDs(0, 0, 255,0,16,8);
|
||||||
CANDle.setLEDs(0, 0, 255,0,32,8);
|
CANDle.setLEDs(0, 0, 255,0,32,8);
|
||||||
CANDle.setLEDs(0, 0, 255,0,56,8);
|
// CANDle.setLEDs(0, 0, 255,0,56,8);
|
||||||
CANDle.setLEDs(0, 0, 255,0,72,8);
|
// CANDle.setLEDs(0, 0, 255,0,72,8);
|
||||||
CANDle.setLEDs(0, 0, 255,0,88,8);
|
// CANDle.setLEDs(0, 0, 255,0,88,8);
|
||||||
CANDle.setLEDs(0, 0, 255,0,104,8);
|
// CANDle.setLEDs(0, 0, 255,0,104,8);
|
||||||
CANDle.setLEDs(0, 0, 255,0,120,8);
|
// CANDle.setLEDs(0, 0, 255,0,120,8);
|
||||||
CANDle.setLEDs(0, 0, 255,0,136,8);
|
// CANDle.setLEDs(0, 0, 255,0,136,8);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@SuppressWarnings("removal")
|
||||||
public void Vert1(){
|
public void Vert1(){
|
||||||
CANDle.setLEDs(0, 255, 0,0,0,8);
|
CANDle.setLEDs(0, 255, 0,0,0,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,16,8);
|
CANDle.setLEDs(0, 255, 0,0,16,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,32,8);
|
CANDle.setLEDs(0, 255, 0,0,32,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,56,8);
|
// CANDle.setLEDs(0, 255, 0,0,56,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,72,8);
|
// CANDle.setLEDs(0, 255, 0,0,72,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,88,8);
|
// CANDle.setLEDs(0, 255, 0,0,88,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,104,8);
|
// CANDle.setLEDs(0, 255, 0,0,104,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,120,8);
|
// CANDle.setLEDs(0, 255, 0,0,120,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,136,8);
|
// CANDle.setLEDs(0, 255, 0,0,136,8);
|
||||||
}
|
}
|
||||||
|
@SuppressWarnings("removal")
|
||||||
public void Rouge(){
|
public void Rouge(){
|
||||||
CANDle.setLEDs(255, 0, 0,0,0,8);
|
CANDle.setLEDs(255, 0, 0,0,0,8);
|
||||||
CANDle.setLEDs(255, 0, 0,0,16,8);
|
CANDle.setLEDs(255, 0, 0,0,16,8);
|
||||||
CANDle.setLEDs(255, 0, 0,0,32,8);
|
CANDle.setLEDs(255, 0, 0,0,32,8);
|
||||||
CANDle.setLEDs(255, 0, 0,0,48,8);
|
// CANDle.setLEDs(255, 0, 0,0,48,8);
|
||||||
CANDle.setLEDs(255, 0, 0,0,64,8);
|
// CANDle.setLEDs(255, 0, 0,0,64,8);
|
||||||
CANDle.setLEDs(255, 0, 0,0,80,8);
|
// CANDle.setLEDs(255, 0, 0,0,80,8);
|
||||||
CANDle.setLEDs(255, 0, 0,0,96,8);
|
// CANDle.setLEDs(255, 0, 0,0,96,8);
|
||||||
CANDle.setLEDs(255, 0, 0,0,112,8);
|
// CANDle.setLEDs(255, 0, 0,0,112,8);
|
||||||
CANDle.setLEDs(255, 0, 0,0,128,8);
|
// CANDle.setLEDs(255, 0, 0,0,128,8);
|
||||||
}
|
}
|
||||||
|
@SuppressWarnings("removal")
|
||||||
public void Jaune2(){
|
public void Jaune2(){
|
||||||
CANDle.setLEDs(255, 255, 0,0,8,8);
|
CANDle.setLEDs(255, 255, 0,0,8,8);
|
||||||
CANDle.setLEDs(255, 255, 0,0,24,8);
|
CANDle.setLEDs(255, 255, 0,0,24,8);
|
||||||
CANDle.setLEDs(255, 255, 0,0,40,8);
|
CANDle.setLEDs(255, 255, 0,0,40,8);
|
||||||
CANDle.setLEDs(255, 255, 0,0,56,8);
|
// CANDle.setLEDs(255, 255, 0,0,56,8);
|
||||||
CANDle.setLEDs(255, 255, 0,0,72,8);
|
// CANDle.setLEDs(255, 255, 0,0,72,8);
|
||||||
CANDle.setLEDs(255, 255, 0,0,88,8);
|
// CANDle.setLEDs(255, 255, 0,0,88,8);
|
||||||
CANDle.setLEDs(255, 255, 0,0,104,8);
|
// CANDle.setLEDs(255, 255, 0,0,104,8);
|
||||||
CANDle.setLEDs(255, 255, 0,0,120,8);
|
// CANDle.setLEDs(255, 255, 0,0,120,8);
|
||||||
CANDle.setLEDs(255, 255, 0,0,136,8);
|
// CANDle.setLEDs(255, 255, 0,0,136,8);
|
||||||
}
|
}
|
||||||
public void Vert2(){
|
@SuppressWarnings("removal")
|
||||||
CANDle.setLEDs(0, 255, 0,0,8,8);
|
public void Rouge2(){
|
||||||
CANDle.setLEDs(0, 255, 0,0,24,8);
|
CANDle.setLEDs(255, 0, 0,0,8,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,40,8);
|
CANDle.setLEDs(255, 0, 0,0,24,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,56,8);
|
CANDle.setLEDs(255, 0, 0,0,40,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,72,8);
|
// CANDle.setLEDs(255, 0, 0,0,56,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,88,8);
|
// CANDle.setLEDs(255, 0, 0,0,72,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,104,8);
|
// CANDle.setLEDs(255, 0, 0,0,88,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,120,8);
|
// CANDle.setLEDs(255, 0, 0,0,104,8);
|
||||||
CANDle.setLEDs(0, 255, 0,0,136,8);
|
// CANDle.setLEDs(255, 0, 0,0,120,8);
|
||||||
|
// CANDle.setLEDs(255, 0, 0,0,136,8);
|
||||||
}
|
}
|
||||||
|
@SuppressWarnings("removal")
|
||||||
public void RainBow(){
|
public void RainBow(){
|
||||||
CANDle.animate(rainbowAnim);
|
CANDle.animate(rainbowAnim);
|
||||||
}
|
}
|
||||||
|
@SuppressWarnings("removal")
|
||||||
public void RainBowStop(){
|
public void RainBowStop(){
|
||||||
CANDle.animate(null);
|
CANDle.animate(null);
|
||||||
}
|
}
|
||||||
@@ -92,6 +99,7 @@ public class Led extends SubsystemBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
|
|
||||||
double temps = DriverStation.getMatchTime();
|
double temps = DriverStation.getMatchTime();
|
||||||
if(temps > 20 && temps < 30){
|
if(temps > 20 && temps < 30){
|
||||||
Vert1();
|
Vert1();
|
||||||
@@ -131,5 +139,7 @@ public class Led extends SubsystemBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// This method will be called once per scheduler run
|
// This method will be called once per scheduler run
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,74 +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.subsystems;
|
|
||||||
|
|
||||||
import edu.wpi.first.net.PortForwarder;
|
|
||||||
import edu.wpi.first.networktables.NetworkTable;
|
|
||||||
import edu.wpi.first.networktables.NetworkTableEntry;
|
|
||||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
|
||||||
import frc.robot.LimelightHelpers;
|
|
||||||
|
|
||||||
public class LimeLight3 extends SubsystemBase {
|
|
||||||
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-balon");
|
|
||||||
NetworkTableEntry pipeline = table.getEntry("pipeline");
|
|
||||||
/** Creates a new LimeLight3. */
|
|
||||||
public LimeLight3() {
|
|
||||||
for(int port = 5800; port <=5807; port++){
|
|
||||||
PortForwarder.add(port, "limelight.local", port);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public double[] getBotPoseBlue(){
|
|
||||||
NetworkTable limelightTable = NetworkTableInstance.getDefault().getTable("limelight-balon");
|
|
||||||
NetworkTableEntry BotPoseEntry = limelightTable.getEntry("botpose_orb_wpiblue");
|
|
||||||
double[] BotPose = BotPoseEntry.getDoubleArray(new double[7]);
|
|
||||||
return BotPose;
|
|
||||||
}
|
|
||||||
public double[] getBotPoseRed(){
|
|
||||||
NetworkTable limelightTable = NetworkTableInstance.getDefault().getTable("limelight-balon");
|
|
||||||
NetworkTableEntry BotPoseEntry = limelightTable.getEntry("botpose_orb_wpired");
|
|
||||||
double[] BotPose = BotPoseEntry.getDoubleArray(new double[7]);
|
|
||||||
return BotPose;
|
|
||||||
}
|
|
||||||
public double getTx(){
|
|
||||||
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-balon");
|
|
||||||
NetworkTableEntry tx = table.getEntry("tx");
|
|
||||||
return tx.getDouble(0.0);
|
|
||||||
}
|
|
||||||
public double getTId(){
|
|
||||||
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-balon");
|
|
||||||
NetworkTableEntry tid = table.getEntry("tid");
|
|
||||||
return tid.getDouble(0.0);
|
|
||||||
}
|
|
||||||
public double getTA(){
|
|
||||||
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-balon");
|
|
||||||
NetworkTableEntry ta = table.getEntry("ta");
|
|
||||||
return ta.getDouble(0.0);
|
|
||||||
}
|
|
||||||
public boolean getV(){
|
|
||||||
return LimelightHelpers.getTV("limelight-balon");
|
|
||||||
}
|
|
||||||
public void AprilTag(){
|
|
||||||
pipeline.setNumber(0);
|
|
||||||
}
|
|
||||||
public void Forme(){
|
|
||||||
pipeline.setNumber(1);
|
|
||||||
}
|
|
||||||
public double Calcule(double x1, double x2, double y1, double y2, double angle)
|
|
||||||
{
|
|
||||||
if (x1 > 4)
|
|
||||||
{
|
|
||||||
return (Math.abs(Math.atan2(x2 - x1, y2 - y1)) * (180 / Math.PI) - angle)/90;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return (Math.abs(Math.atan2(x2 - x1, y2 - y1)) * (180 / Math.PI) + angle) * -1/90;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void periodic() {
|
|
||||||
// This method will be called once per scheduler run
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,68 +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.subsystems;
|
|
||||||
|
|
||||||
import edu.wpi.first.net.PortForwarder;
|
|
||||||
import edu.wpi.first.networktables.NetworkTable;
|
|
||||||
import edu.wpi.first.networktables.NetworkTableEntry;
|
|
||||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
|
||||||
import frc.robot.LimelightHelpers;
|
|
||||||
|
|
||||||
public class Limelight3G extends SubsystemBase {
|
|
||||||
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
|
||||||
NetworkTableEntry pipeline = table.getEntry("pipeline");
|
|
||||||
/** Creates a new LimeLight3. */
|
|
||||||
public Limelight3G() {
|
|
||||||
for(int port = 5800; port <=5807; port++){
|
|
||||||
PortForwarder.add(port, "limelight.local", port);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public double[] getBotPoseBlue(){
|
|
||||||
NetworkTable limelightTable = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
|
||||||
NetworkTableEntry BotPoseEntry = limelightTable.getEntry("botpose_orb_wpiblue");
|
|
||||||
double[] BotPose = BotPoseEntry.getDoubleArray(new double[7]);
|
|
||||||
return BotPose;
|
|
||||||
}
|
|
||||||
public double[] getBotPoseRed(){
|
|
||||||
NetworkTable limelightTable = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
|
||||||
NetworkTableEntry BotPoseEntry = limelightTable.getEntry("botpose_orb_wpired");
|
|
||||||
double[] BotPose = BotPoseEntry.getDoubleArray(new double[7]);
|
|
||||||
return BotPose;
|
|
||||||
}
|
|
||||||
public double getTx(){
|
|
||||||
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
|
||||||
NetworkTableEntry tx = table.getEntry("tx");
|
|
||||||
return tx.getDouble(0.0);
|
|
||||||
}
|
|
||||||
public double getTId(){
|
|
||||||
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
|
||||||
NetworkTableEntry tid = table.getEntry("tid");
|
|
||||||
return tid.getDouble(0.0);
|
|
||||||
}
|
|
||||||
public double getTA(){
|
|
||||||
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-tag");
|
|
||||||
NetworkTableEntry ta = table.getEntry("ta");
|
|
||||||
return ta.getDouble(0.0);
|
|
||||||
}
|
|
||||||
public boolean getV(){
|
|
||||||
return LimelightHelpers.getTV("limelight-tag");
|
|
||||||
}
|
|
||||||
public double Calcule(double x1, double x2, double y1, double y2, double angle)
|
|
||||||
{
|
|
||||||
if (x1 > 4)
|
|
||||||
{
|
|
||||||
return (Math.abs(Math.atan2(x2 - x1, y2 - y1)) * (180 / Math.PI) - angle)/90;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return (Math.abs(Math.atan2(x2 - x1, y2 - y1)) * (180 / Math.PI) + angle) * -1/90;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void periodic() {
|
|
||||||
// This method will be called once per scheduler run
|
|
||||||
}
|
|
||||||
}
|
|
||||||
82
src/main/java/frc/robot/subsystems/PivotBalayeuse.java
Normal file
82
src/main/java/frc/robot/subsystems/PivotBalayeuse.java
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
// 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.subsystems;
|
||||||
|
|
||||||
|
import com.revrobotics.PersistMode;
|
||||||
|
import com.revrobotics.RelativeEncoder;
|
||||||
|
import com.revrobotics.ResetMode;
|
||||||
|
import com.revrobotics.spark.SparkLowLevel.MotorType;
|
||||||
|
import com.revrobotics.spark.SparkMax;
|
||||||
|
import com.revrobotics.spark.config.SoftLimitConfig;
|
||||||
|
import com.revrobotics.spark.config.SparkBaseConfig;
|
||||||
|
import com.revrobotics.spark.config.SparkBaseConfig.IdleMode;
|
||||||
|
import com.revrobotics.spark.config.SparkMaxConfig;
|
||||||
|
|
||||||
|
import edu.wpi.first.networktables.GenericEntry;
|
||||||
|
import edu.wpi.first.wpilibj.DigitalInput;
|
||||||
|
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||||
|
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
|
||||||
|
public class PivotBalayeuse extends SubsystemBase {
|
||||||
|
|
||||||
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
|
|
||||||
|
SparkMax moteur = new SparkMax(8, MotorType.kBrushless);
|
||||||
|
RelativeEncoder encoder = moteur.getEncoder();
|
||||||
|
DigitalInput limit = new DigitalInput(9);
|
||||||
|
|
||||||
|
private GenericEntry ntEncodeurBalayeuse = teb.add("Position bas balayeuse", 1.8).getEntry();
|
||||||
|
|
||||||
|
private double maxEncodeur = ntEncodeurBalayeuse.getDouble(1.8);
|
||||||
|
|
||||||
|
private double vitesseMonter = 0.5;
|
||||||
|
private double vitesseDescendre = -0.5;
|
||||||
|
|
||||||
|
/** Creates a new PivotBalayeuse. */
|
||||||
|
public PivotBalayeuse() {
|
||||||
|
configMoteurs();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configMoteurs() {
|
||||||
|
SparkBaseConfig configMoteur = new SparkMaxConfig().apply(
|
||||||
|
new SoftLimitConfig().forwardSoftLimit(maxEncodeur).forwardSoftLimitEnabled(true)
|
||||||
|
.reverseSoftLimit(0.6).reverseSoftLimitEnabled(true))
|
||||||
|
.openLoopRampRate(0.1)
|
||||||
|
.idleMode(IdleMode.kBrake);
|
||||||
|
moteur.configure(configMoteur, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command monter() {
|
||||||
|
return startEnd(() -> moteur.set(vitesseMonter), () -> moteur.set(0))
|
||||||
|
.until(() -> moteur.getForwardSoftLimit().isReached());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command descendre() {
|
||||||
|
return startEnd(() -> moteur.set(vitesseDescendre), () -> moteur.set(0))
|
||||||
|
.until(() -> moteur.getReverseSoftLimit().isReached());
|
||||||
|
}
|
||||||
|
|
||||||
|
public double EncodeurBalayeuse() {
|
||||||
|
return ntEncodeurBalayeuse.getDouble(1.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void periodic() {
|
||||||
|
teb.addBoolean("limit balayeuse", limit::get);
|
||||||
|
teb.addDouble("encodeur balayeuse", encoder::getPosition);
|
||||||
|
|
||||||
|
if (!limit.get()) {
|
||||||
|
encoder.setPosition(0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
double newEncoderMax = ntEncodeurBalayeuse.getDouble(maxEncodeur);
|
||||||
|
if (newEncoderMax != maxEncodeur) {
|
||||||
|
maxEncodeur = newEncoderMax;
|
||||||
|
configMoteurs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"fileName": "PathplannerLib-2025.2.7.json",
|
"fileName": "PathplannerLib-2026.1.2.json",
|
||||||
"name": "PathplannerLib",
|
"name": "PathplannerLib",
|
||||||
"version": "2025.2.7",
|
"version": "2026.1.2",
|
||||||
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786",
|
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786",
|
||||||
"frcYear": "2025",
|
"frcYear": "2026",
|
||||||
"mavenUrls": [
|
"mavenUrls": [
|
||||||
"https://3015rangerrobotics.github.io/pathplannerlib/repo"
|
"https://3015rangerrobotics.github.io/pathplannerlib/repo"
|
||||||
],
|
],
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.pathplanner.lib",
|
"groupId": "com.pathplanner.lib",
|
||||||
"artifactId": "PathplannerLib-java",
|
"artifactId": "PathplannerLib-java",
|
||||||
"version": "2025.2.7"
|
"version": "2026.1.2"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"jniDependencies": [],
|
"jniDependencies": [],
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.pathplanner.lib",
|
"groupId": "com.pathplanner.lib",
|
||||||
"artifactId": "PathplannerLib-cpp",
|
"artifactId": "PathplannerLib-cpp",
|
||||||
"version": "2025.2.7",
|
"version": "2026.1.2",
|
||||||
"libName": "PathplannerLib",
|
"libName": "PathplannerLib",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": false,
|
"sharedLibrary": false,
|
||||||
@@ -1,50 +1,50 @@
|
|||||||
{
|
{
|
||||||
"fileName": "Phoenix5-5.35.1.json",
|
"fileName": "Phoenix5-5.36.0.json",
|
||||||
"name": "CTRE-Phoenix (v5)",
|
"name": "CTRE-Phoenix (v5)",
|
||||||
"version": "5.35.1",
|
"version": "5.36.0",
|
||||||
"frcYear": "2025",
|
"frcYear": "2026",
|
||||||
"uuid": "ab676553-b602-441f-a38d-f1296eff6537",
|
"uuid": "ab676553-b602-441f-a38d-f1296eff6537",
|
||||||
"mavenUrls": [
|
"mavenUrls": [
|
||||||
"https://maven.ctr-electronics.com/release/"
|
"https://maven.ctr-electronics.com/release/"
|
||||||
],
|
],
|
||||||
"jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-frc2025-latest.json",
|
"jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-frc2026-latest.json",
|
||||||
"requires": [
|
"requires": [
|
||||||
{
|
{
|
||||||
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
|
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
|
||||||
"errorMessage": "Phoenix 5 requires low-level libraries from Phoenix 6. Please add the Phoenix 6 vendordep before adding Phoenix 5.",
|
"errorMessage": "Phoenix 5 requires low-level libraries from Phoenix 6. Please add the Phoenix 6 vendordep before adding Phoenix 5.",
|
||||||
"offlineFileName": "Phoenix6-frc2025-latest.json",
|
"offlineFileName": "Phoenix6-frc2026-latest.json",
|
||||||
"onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2025-latest.json"
|
"onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2026-latest.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"conflictsWith": [
|
"conflictsWith": [
|
||||||
{
|
{
|
||||||
"uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af",
|
"uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af",
|
||||||
"errorMessage": "Users must use the Phoenix 5 replay vendordep when using the Phoenix 6 replay vendordep.",
|
"errorMessage": "Users must use the Phoenix 5 replay vendordep when using the Phoenix 6 replay vendordep.",
|
||||||
"offlineFileName": "Phoenix6-replay-frc2025-latest.json"
|
"offlineFileName": "Phoenix6-replay-frc2026-latest.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"uuid": "fbc886a4-2cec-40c0-9835-71086a8cc3df",
|
"uuid": "fbc886a4-2cec-40c0-9835-71086a8cc3df",
|
||||||
"errorMessage": "Users cannot have both the replay and regular Phoenix 5 vendordeps in their robot program.",
|
"errorMessage": "Users cannot have both the replay and regular Phoenix 5 vendordeps in their robot program.",
|
||||||
"offlineFileName": "Phoenix5-replay-frc2025-latest.json"
|
"offlineFileName": "Phoenix5-replay-frc2026-latest.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"javaDependencies": [
|
"javaDependencies": [
|
||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix",
|
"groupId": "com.ctre.phoenix",
|
||||||
"artifactId": "api-java",
|
"artifactId": "api-java",
|
||||||
"version": "5.35.1"
|
"version": "5.36.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix",
|
"groupId": "com.ctre.phoenix",
|
||||||
"artifactId": "wpiapi-java",
|
"artifactId": "wpiapi-java",
|
||||||
"version": "5.35.1"
|
"version": "5.36.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"jniDependencies": [
|
"jniDependencies": [
|
||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix",
|
"groupId": "com.ctre.phoenix",
|
||||||
"artifactId": "cci",
|
"artifactId": "cci",
|
||||||
"version": "5.35.1",
|
"version": "5.36.0",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix.sim",
|
"groupId": "com.ctre.phoenix.sim",
|
||||||
"artifactId": "cci-sim",
|
"artifactId": "cci-sim",
|
||||||
"version": "5.35.1",
|
"version": "5.36.0",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix",
|
"groupId": "com.ctre.phoenix",
|
||||||
"artifactId": "wpiapi-cpp",
|
"artifactId": "wpiapi-cpp",
|
||||||
"version": "5.35.1",
|
"version": "5.36.0",
|
||||||
"libName": "CTRE_Phoenix_WPI",
|
"libName": "CTRE_Phoenix_WPI",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix",
|
"groupId": "com.ctre.phoenix",
|
||||||
"artifactId": "api-cpp",
|
"artifactId": "api-cpp",
|
||||||
"version": "5.35.1",
|
"version": "5.36.0",
|
||||||
"libName": "CTRE_Phoenix",
|
"libName": "CTRE_Phoenix",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix",
|
"groupId": "com.ctre.phoenix",
|
||||||
"artifactId": "cci",
|
"artifactId": "cci",
|
||||||
"version": "5.35.1",
|
"version": "5.36.0",
|
||||||
"libName": "CTRE_PhoenixCCI",
|
"libName": "CTRE_PhoenixCCI",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix.sim",
|
"groupId": "com.ctre.phoenix.sim",
|
||||||
"artifactId": "wpiapi-cpp-sim",
|
"artifactId": "wpiapi-cpp-sim",
|
||||||
"version": "5.35.1",
|
"version": "5.36.0",
|
||||||
"libName": "CTRE_Phoenix_WPISim",
|
"libName": "CTRE_Phoenix_WPISim",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix.sim",
|
"groupId": "com.ctre.phoenix.sim",
|
||||||
"artifactId": "api-cpp-sim",
|
"artifactId": "api-cpp-sim",
|
||||||
"version": "5.35.1",
|
"version": "5.36.0",
|
||||||
"libName": "CTRE_PhoenixSim",
|
"libName": "CTRE_PhoenixSim",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix.sim",
|
"groupId": "com.ctre.phoenix.sim",
|
||||||
"artifactId": "cci-sim",
|
"artifactId": "cci-sim",
|
||||||
"version": "5.35.1",
|
"version": "5.36.0",
|
||||||
"libName": "CTRE_PhoenixCCISim",
|
"libName": "CTRE_PhoenixCCISim",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -1,32 +1,32 @@
|
|||||||
{
|
{
|
||||||
"fileName": "Phoenix6-frc2025-latest.json",
|
"fileName": "Phoenix6-26.1.3.json",
|
||||||
"name": "CTRE-Phoenix (v6)",
|
"name": "CTRE-Phoenix (v6)",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"frcYear": "2025",
|
"frcYear": "2026",
|
||||||
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
|
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
|
||||||
"mavenUrls": [
|
"mavenUrls": [
|
||||||
"https://maven.ctr-electronics.com/release/"
|
"https://maven.ctr-electronics.com/release/"
|
||||||
],
|
],
|
||||||
"jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2025-latest.json",
|
"jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2026-latest.json",
|
||||||
"conflictsWith": [
|
"conflictsWith": [
|
||||||
{
|
{
|
||||||
"uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af",
|
"uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af",
|
||||||
"errorMessage": "Users can not have both the replay and regular Phoenix 6 vendordeps in their robot program.",
|
"errorMessage": "Users can not have both the replay and regular Phoenix 6 vendordeps in their robot program.",
|
||||||
"offlineFileName": "Phoenix6-replay-frc2025-latest.json"
|
"offlineFileName": "Phoenix6-replay-frc2026-latest.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"javaDependencies": [
|
"javaDependencies": [
|
||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6",
|
"groupId": "com.ctre.phoenix6",
|
||||||
"artifactId": "wpiapi-java",
|
"artifactId": "wpiapi-java",
|
||||||
"version": "25.4.0"
|
"version": "26.1.3"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"jniDependencies": [
|
"jniDependencies": [
|
||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6",
|
"groupId": "com.ctre.phoenix6",
|
||||||
"artifactId": "api-cpp",
|
"artifactId": "api-cpp",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6",
|
"groupId": "com.ctre.phoenix6",
|
||||||
"artifactId": "tools",
|
"artifactId": "tools",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "api-cpp-sim",
|
"artifactId": "api-cpp-sim",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "tools-sim",
|
"artifactId": "tools-sim",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simTalonSRX",
|
"artifactId": "simTalonSRX",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simVictorSPX",
|
"artifactId": "simVictorSPX",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -110,21 +110,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simPigeonIMU",
|
"artifactId": "simPigeonIMU",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxarm64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simCANCoder",
|
|
||||||
"version": "25.4.0",
|
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -138,7 +124,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProTalonFX",
|
"artifactId": "simProTalonFX",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -152,7 +138,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProTalonFXS",
|
"artifactId": "simProTalonFXS",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -166,7 +152,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProCANcoder",
|
"artifactId": "simProCANcoder",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -180,7 +166,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProPigeon2",
|
"artifactId": "simProPigeon2",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -194,7 +180,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProCANrange",
|
"artifactId": "simProCANrange",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -208,7 +194,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProCANdi",
|
"artifactId": "simProCANdi",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -222,7 +208,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProCANdle",
|
"artifactId": "simProCANdle",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -238,7 +224,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6",
|
"groupId": "com.ctre.phoenix6",
|
||||||
"artifactId": "wpiapi-cpp",
|
"artifactId": "wpiapi-cpp",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_Phoenix6_WPI",
|
"libName": "CTRE_Phoenix6_WPI",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -254,7 +240,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6",
|
"groupId": "com.ctre.phoenix6",
|
||||||
"artifactId": "tools",
|
"artifactId": "tools",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_PhoenixTools",
|
"libName": "CTRE_PhoenixTools",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -270,7 +256,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "wpiapi-cpp-sim",
|
"artifactId": "wpiapi-cpp-sim",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_Phoenix6_WPISim",
|
"libName": "CTRE_Phoenix6_WPISim",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -286,7 +272,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "tools-sim",
|
"artifactId": "tools-sim",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_PhoenixTools_Sim",
|
"libName": "CTRE_PhoenixTools_Sim",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -302,7 +288,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simTalonSRX",
|
"artifactId": "simTalonSRX",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimTalonSRX",
|
"libName": "CTRE_SimTalonSRX",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -318,7 +304,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simVictorSPX",
|
"artifactId": "simVictorSPX",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimVictorSPX",
|
"libName": "CTRE_SimVictorSPX",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -334,7 +320,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simPigeonIMU",
|
"artifactId": "simPigeonIMU",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimPigeonIMU",
|
"libName": "CTRE_SimPigeonIMU",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -347,26 +333,10 @@
|
|||||||
],
|
],
|
||||||
"simMode": "swsim"
|
"simMode": "swsim"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simCANCoder",
|
|
||||||
"version": "25.4.0",
|
|
||||||
"libName": "CTRE_SimCANCoder",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxarm64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProTalonFX",
|
"artifactId": "simProTalonFX",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimProTalonFX",
|
"libName": "CTRE_SimProTalonFX",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -382,7 +352,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProTalonFXS",
|
"artifactId": "simProTalonFXS",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimProTalonFXS",
|
"libName": "CTRE_SimProTalonFXS",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -398,7 +368,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProCANcoder",
|
"artifactId": "simProCANcoder",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimProCANcoder",
|
"libName": "CTRE_SimProCANcoder",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -414,7 +384,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProPigeon2",
|
"artifactId": "simProPigeon2",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimProPigeon2",
|
"libName": "CTRE_SimProPigeon2",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -430,7 +400,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProCANrange",
|
"artifactId": "simProCANrange",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimProCANrange",
|
"libName": "CTRE_SimProCANrange",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -446,7 +416,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProCANdi",
|
"artifactId": "simProCANdi",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimProCANdi",
|
"libName": "CTRE_SimProCANdi",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -462,7 +432,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
"groupId": "com.ctre.phoenix6.sim",
|
||||||
"artifactId": "simProCANdle",
|
"artifactId": "simProCANdle",
|
||||||
"version": "25.4.0",
|
"version": "26.1.3",
|
||||||
"libName": "CTRE_SimProCANdle",
|
"libName": "CTRE_SimProCANdle",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
@@ -1,25 +1,55 @@
|
|||||||
{
|
{
|
||||||
"fileName": "REVLib.json",
|
"fileName": "REVLib.json",
|
||||||
"name": "REVLib",
|
"name": "REVLib",
|
||||||
"version": "2025.0.3",
|
"version": "2026.0.5",
|
||||||
"frcYear": "2025",
|
"frcYear": "2026",
|
||||||
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb",
|
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb",
|
||||||
"mavenUrls": [
|
"mavenUrls": [
|
||||||
"https://maven.revrobotics.com/"
|
"https://maven.revrobotics.com/"
|
||||||
],
|
],
|
||||||
"jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2025.json",
|
"jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2026.json",
|
||||||
"javaDependencies": [
|
"javaDependencies": [
|
||||||
{
|
{
|
||||||
"groupId": "com.revrobotics.frc",
|
"groupId": "com.revrobotics.frc",
|
||||||
"artifactId": "REVLib-java",
|
"artifactId": "REVLib-java",
|
||||||
"version": "2025.0.3"
|
"version": "2026.0.5"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"jniDependencies": [
|
"jniDependencies": [
|
||||||
{
|
{
|
||||||
"groupId": "com.revrobotics.frc",
|
"groupId": "com.revrobotics.frc",
|
||||||
"artifactId": "REVLib-driver",
|
"artifactId": "REVLib-driver",
|
||||||
"version": "2025.0.3",
|
"version": "2026.0.5",
|
||||||
|
"skipInvalidPlatforms": true,
|
||||||
|
"isJar": false,
|
||||||
|
"validPlatforms": [
|
||||||
|
"windowsx86-64",
|
||||||
|
"linuxarm64",
|
||||||
|
"linuxx86-64",
|
||||||
|
"linuxathena",
|
||||||
|
"linuxarm32",
|
||||||
|
"osxuniversal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupId": "com.revrobotics.frc",
|
||||||
|
"artifactId": "RevLibBackendDriver",
|
||||||
|
"version": "2026.0.5",
|
||||||
|
"skipInvalidPlatforms": true,
|
||||||
|
"isJar": false,
|
||||||
|
"validPlatforms": [
|
||||||
|
"windowsx86-64",
|
||||||
|
"linuxarm64",
|
||||||
|
"linuxx86-64",
|
||||||
|
"linuxathena",
|
||||||
|
"linuxarm32",
|
||||||
|
"osxuniversal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupId": "com.revrobotics.frc",
|
||||||
|
"artifactId": "RevLibWpiBackendDriver",
|
||||||
|
"version": "2026.0.5",
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"isJar": false,
|
"isJar": false,
|
||||||
"validPlatforms": [
|
"validPlatforms": [
|
||||||
@@ -36,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.revrobotics.frc",
|
"groupId": "com.revrobotics.frc",
|
||||||
"artifactId": "REVLib-cpp",
|
"artifactId": "REVLib-cpp",
|
||||||
"version": "2025.0.3",
|
"version": "2026.0.5",
|
||||||
"libName": "REVLib",
|
"libName": "REVLib",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": false,
|
"sharedLibrary": false,
|
||||||
@@ -53,7 +83,7 @@
|
|||||||
{
|
{
|
||||||
"groupId": "com.revrobotics.frc",
|
"groupId": "com.revrobotics.frc",
|
||||||
"artifactId": "REVLib-driver",
|
"artifactId": "REVLib-driver",
|
||||||
"version": "2025.0.3",
|
"version": "2026.0.5",
|
||||||
"libName": "REVLibDriver",
|
"libName": "REVLibDriver",
|
||||||
"headerClassifier": "headers",
|
"headerClassifier": "headers",
|
||||||
"sharedLibrary": false,
|
"sharedLibrary": false,
|
||||||
@@ -66,6 +96,38 @@
|
|||||||
"linuxarm32",
|
"linuxarm32",
|
||||||
"osxuniversal"
|
"osxuniversal"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupId": "com.revrobotics.frc",
|
||||||
|
"artifactId": "RevLibBackendDriver",
|
||||||
|
"version": "2026.0.5",
|
||||||
|
"libName": "BackendDriver",
|
||||||
|
"sharedLibrary": true,
|
||||||
|
"skipInvalidPlatforms": true,
|
||||||
|
"binaryPlatforms": [
|
||||||
|
"windowsx86-64",
|
||||||
|
"linuxarm64",
|
||||||
|
"linuxx86-64",
|
||||||
|
"linuxathena",
|
||||||
|
"linuxarm32",
|
||||||
|
"osxuniversal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupId": "com.revrobotics.frc",
|
||||||
|
"artifactId": "RevLibWpiBackendDriver",
|
||||||
|
"version": "2026.0.5",
|
||||||
|
"libName": "REVLibWpi",
|
||||||
|
"sharedLibrary": true,
|
||||||
|
"skipInvalidPlatforms": true,
|
||||||
|
"binaryPlatforms": [
|
||||||
|
"windowsx86-64",
|
||||||
|
"linuxarm64",
|
||||||
|
"linuxx86-64",
|
||||||
|
"linuxathena",
|
||||||
|
"linuxarm32",
|
||||||
|
"osxuniversal"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
"name": "WPILib-New-Commands",
|
"name": "WPILib-New-Commands",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266",
|
"uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266",
|
||||||
"frcYear": "2025",
|
"frcYear": "2026",
|
||||||
"mavenUrls": [],
|
"mavenUrls": [],
|
||||||
"jsonUrl": "",
|
"jsonUrl": "",
|
||||||
"javaDependencies": [
|
"javaDependencies": [
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
"sharedLibrary": true,
|
"sharedLibrary": true,
|
||||||
"skipInvalidPlatforms": true,
|
"skipInvalidPlatforms": true,
|
||||||
"binaryPlatforms": [
|
"binaryPlatforms": [
|
||||||
|
"linuxsystemcore",
|
||||||
"linuxathena",
|
"linuxathena",
|
||||||
"linuxarm32",
|
"linuxarm32",
|
||||||
"linuxarm64",
|
"linuxarm64",
|
||||||
|
|||||||
Reference in New Issue
Block a user