This commit is contained in:
Antoine PerreaultE 2024-02-24 13:43:52 -05:00
commit 68f03768a1
5 changed files with 102 additions and 32 deletions

View File

@ -0,0 +1,95 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 0.7,
"y": 6.7
},
"rotation": 150.0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "deadline",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "lancer"
}
}
]
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "3.1"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.7
}
},
{
"type": "named",
"data": {
"name": "balayer"
}
}
]
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "3.2"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "lancer"
}
}
]
}
}
]
}
},
"folder": "3",
"choreoAuto": false
}

View File

@ -2,10 +2,10 @@
"version": 1.0,
"startingPose": {
"position": {
"x": 0.7,
"y": 6.7
"x": 1.3,
"y": 5.55
},
"rotation": 150.0
"rotation": 90.0
},
"command": {
"type": "sequential",
@ -37,7 +37,7 @@
{
"type": "path",
"data": {
"pathName": "3.1"
"pathName": "Copy of 1.1"
}
},
{
@ -47,7 +47,7 @@
{
"type": "wait",
"data": {
"waitTime": 3.7
"waitTime": 6.0
}
},
{
@ -65,7 +65,7 @@
{
"type": "path",
"data": {
"pathName": "3.2"
"pathName": "Copy of 1.2"
}
},
{
@ -90,6 +90,6 @@
]
}
},
"folder": "3",
"folder": "1",
"choreoAuto": false
}

View File

@ -30,16 +30,6 @@ public class GrimpeurDroit extends Command {
@Override
public void execute() {
grimpeur.droit(doubleSupplier.getAsDouble());
if(grimpeur.getpitch()<-15){
grimpeur.droit(-doubleSupplier.getAsDouble());
}
else if(grimpeur.getpitch()>15){
grimpeur.droit(doubleSupplier.getAsDouble());
}
else{
grimpeur.droit(0);
}
}
// Called once the command ends or is interrupted.

View File

@ -31,21 +31,6 @@ public class GrimpeurGauche extends Command {
@Override
public void execute() {
grimpeur.gauche(doubleSupplier.getAsDouble());
if(grimpeur.getpitch()<-15){
grimpeur.gauche(doubleSupplier.getAsDouble());
}
else if(grimpeur.getpitch()>15){
grimpeur.gauche(-doubleSupplier.getAsDouble());
}
else{
grimpeur.gauche(0);
}
if(grimpeur.encoderg()<0){
grimpeur.gauche(doubleSupplier.getAsDouble());
}
else{
grimpeur.gauche(0);
}
}
// Called once the command ends or is interrupted.