Skip to content

Commit

Permalink
Merge pull request #110 from 2491-NoMythic/Augie-Messing-With-Pathpla…
Browse files Browse the repository at this point in the history
…nner

Augie messing with pathplanner
  • Loading branch information
KnightPiscesAugie authored Mar 21, 2024
2 parents 2d73028 + 46d3281 commit cfb5941
Show file tree
Hide file tree
Showing 33 changed files with 93 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 1.3171869760109631,
"y": 5.5410316277334815
},
"rotation": 180.0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "initialShot"
}
},
{
"type": "named",
"data": {
"name": "shooterOn"
}
},
{
"type": "path",
"data": {
"pathName": "CloseMidPickupAuto"
}
},
{
"type": "named",
"data": {
"name": "autoPickup"
}
},
{
"type": "named",
"data": {
"name": "autoShootNote"
}
},
{
"type": "path",
"data": {
"pathName": "CloseAmpPickupFromMidAuto"
}
},
{
"type": "named",
"data": {
"name": "autoPickup"
}
},
{
"type": "named",
"data": {
"name": "autoShootNote"
}
},
{
"type": "path",
"data": {
"pathName": "Blue1AutoPickup"
}
},
{
"type": "named",
"data": {
"name": "autoPickup"
}
},
{
"type": "path",
"data": {
"pathName": "BlueAmpShoot1"
}
},
{
"type": "named",
"data": {
"name": "autoShootNote"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/DrivetrainSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public double calculateSpeakerAngle(){
deltaX = Math.abs(dtvalues.getX() - Field.RED_SPEAKER_X);
}
speakerDist = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
// SmartDashboard.putNumber("dist to speakre", speakerDist);
// SmartDashboard.putNumber("dist to speaker", speakerDist);

// RobotState.getInstance().ShooterInRange = speakerDist<Field.MAX_SHOOTING_DISTANCE;

Expand Down Expand Up @@ -334,7 +334,7 @@ public double calculateSpeakerAngleMoving(){
}
deltaY = Math.abs(dtvalues.getY() - Field.SPEAKER_Y);
speakerDist = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
// SmartDashboard.putNumber("dist to speakre", speakerDist);
// SmartDashboard.putNumber("dist to speaker", speakerDist);

Rotation2d unadjustedAngle = Rotation2d.fromRadians(Math.asin(deltaX/speakerDist));
double totalDistToSpeaker = Math.sqrt(Math.pow(Field.SPEAKER_Z-ShooterConstants.SHOOTER_HEIGHT, 2) + Math.pow(speakerDist, 2));
Expand Down

0 comments on commit cfb5941

Please sign in to comment.