Skip to content

Commit

Permalink
Safe close auton done
Browse files Browse the repository at this point in the history
  • Loading branch information
alexDickhans committed Apr 11, 2024
1 parent f96fa63 commit e3e93fe
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/auton.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define AUTON 0
#define AUTON 2
11 changes: 3 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,12 @@ void skills(void *args) {
}

void safeCloseAWP(void *args) {
imuOrientation.setRotation(135_deg);

intakeExtensionStateController->sb(deploySequence);

move(10_in, defaultProfileConstraints, 0.0);
imuOrientation.setRotation(-135_deg);

intakeExtensionStateController->ud();
intakeStateController->sb(intakeIntaking);
pathFollower->setMotionProfile(safe_close_awp);
drivetrainStateController->sb(pathFollower)->wait();
pros::Task::delay(15000);

turnTo(185_deg, 15_s, closest, -4000);
}

void closeRushMid(void *args) {
Expand Down
103 changes: 102 additions & 1 deletion static/safe_close_awp.json
Original file line number Diff line number Diff line change
@@ -1 +1,102 @@
{"segments":[{"inverted":true,"stopEnd":false,"paths":[{"x":3.147,"y":0.398},{"x":3.319,"y":0.54},{"x":3.375,"y":0.684},{"x":3.266,"y":0.864}],"constraints":{"velocity":35,"accel":120}}],"commands":[{"t":0.0,"name":"backLeftWingOut"},{"t":0.4,"name":"backLeftWingIn"}]}
{
"startSpeed": 0.0,
"endSpeed": 0.0,
"segments": [
{
"inverted": false,
"stopEnd": false,
"paths": [
{
"x": 3.242,
"y": 0.569
},
{
"x": 3.149,
"y": 0.452
},
{
"x": 2.952,
"y": 0.35
},
{
"x": 2.763,
"y": 0.322
}
],
"constraints": {
"velocity": 30,
"accel": 120
}
},
{
"inverted": true,
"stopEnd": false,
"paths": [
{
"x": 2.76,
"y": 0.325
},
{
"x": 3.293,
"y": 0.399
},
{
"x": 3.344,
"y": 0.778
},
{
"x": 3.321,
"y": 1.081
}
],
"constraints": {
"velocity": 30,
"accel": 120
}
},
{
"inverted": true,
"stopEnd": false,
"paths": [
{
"x": 3.319,
"y": 1.082
},
{
"x": 3.307,
"y": 1.32
},
{
"x": 3.277,
"y": 1.535
},
{
"x": 3.272,
"y": 1.704
}
],
"constraints": {
"velocity": 30,
"accel": 120
}
}
],
"commands": [
{
"t": 0.0,
"name": "outtake"
},
{
"t": 0.86,
"name": "backLeftWingOut"
},
{
"t": 1.3,
"name": "backLeftWingIn"
},
{
"t": 2.7,
"name": "backRightWingOut"
}
]
}

0 comments on commit e3e93fe

Please sign in to comment.