This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pure pursuit target point calculation (#111)
* Add math to find perpendicular points as well as lookahead points * Start adding point processing * Add unit test * Fix getLookaheadWaypoint to always give a lookahead point toward the end point * Simplify test assertions with Pose2ds * Remove old summing test * Change heuristic logs for multiple path tracking logging * Do more testing for perp and lookahead math * Make a pure pursuit test auto * Start debugging pure pursuit * Change pure pursuit aligning to head toward start pose * Format * reset previous auto point index trailblazer * Add interpolated rotation pure pursuit path tracking * Incorporate a curvature based dynamic lookahead * Make a test auto for in person robot testing with pure pursuit * OP auto segment fix * Add interpolated rotation pure pursuit path tracking * Add rotation check to isFinished() for pure pursuit tracker * Update dependency gradle to v8.12 (#100) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.junit.jupiter:junit-jupiter to v5.11.4 (#114) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix typo in expected result for linear velocity test * linear velocity & acceleration constraints * angular acceleration & velocity constraints * Format * Make changes to the test auto * Fix linear acceleration constraint math to return negative and positive values * add rotation element to isFinished() pure pursuit * Fix pure pursuit issue with jumping lookahead * Play with constraints in test auto * dynamic velocity constraint potential change * Format * Make 4 peice auto Kitbot with Trailblazer * Remove segment motion profile and format --------- Co-authored-by: Simon <87281874+simonp17@users.noreply.github.com> Co-authored-by: Jonah Snider <jonah@jonahsnider.com> Co-authored-by: fcuellar13 <105395555+fcuellar13@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information
1 parent
67c4eaf
commit 4ba4c17
Showing
10 changed files
with
509 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package frc.robot.autos.amp; | ||
|
||
import edu.wpi.first.math.geometry.Pose2d; | ||
import edu.wpi.first.math.geometry.Rotation2d; | ||
import edu.wpi.first.wpilibj2.command.Command; | ||
import edu.wpi.first.wpilibj2.command.Commands; | ||
import frc.robot.autos.BaseAuto; | ||
import frc.robot.autos.trailblazer.AutoPoint; | ||
import frc.robot.autos.trailblazer.AutoSegment; | ||
import frc.robot.autos.trailblazer.Trailblazer; | ||
import frc.robot.autos.trailblazer.constraints.AutoConstraintOptions; | ||
import frc.robot.robot_manager.RobotManager; | ||
|
||
public class TestAuto extends BaseAuto { | ||
public TestAuto(RobotManager robotManager, Trailblazer trailblazer) { | ||
super(robotManager, trailblazer); | ||
} | ||
|
||
@Override | ||
protected Command getBlueAutoCommand() { | ||
return Commands.none(); | ||
} | ||
|
||
@Override | ||
protected Command getRedAutoCommand() { | ||
return Commands.sequence( | ||
Commands.print("example command on auto start"), | ||
Commands.runOnce( | ||
() -> | ||
robotManager.localization.resetPose( | ||
new Pose2d(9.0, 4.0, Rotation2d.fromDegrees(0)))), | ||
trailblazer.followSegment( | ||
new AutoSegment( | ||
new AutoConstraintOptions(false, 5, 500, 8.0, 5000), | ||
new AutoPoint(new Pose2d(11.8, 4.0, Rotation2d.fromDegrees(0))))), | ||
trailblazer.followSegment( | ||
new AutoSegment( | ||
new AutoConstraintOptions(false, 5, 500, 8.0, 500), | ||
new AutoPoint(new Pose2d(10.9, 5.0, Rotation2d.fromDegrees(-10))), | ||
new AutoPoint(new Pose2d(16.157, 7.043, Rotation2d.fromDegrees(-125.216))))), | ||
trailblazer.followSegment( | ||
new AutoSegment( | ||
new AutoConstraintOptions(false, 5, 500, 8.0, 500), | ||
new AutoPoint(new Pose2d(13.6, 5.2, Rotation2d.fromDegrees(-120.559))))), | ||
trailblazer.followSegment( | ||
new AutoSegment( | ||
new AutoConstraintOptions(false, 5, 500, 8.0, 500), | ||
new AutoPoint(new Pose2d(16.157, 7.043, Rotation2d.fromDegrees(-125.216))))), | ||
trailblazer.followSegment( | ||
new AutoSegment( | ||
new AutoConstraintOptions(false, 5, 500, 8.0, 500), | ||
new AutoPoint(new Pose2d(13.6, 5.2, Rotation2d.fromDegrees(-120.559))))), | ||
trailblazer.followSegment( | ||
new AutoSegment( | ||
new AutoConstraintOptions(false, 5, 500, 8.0, 500), | ||
new AutoPoint(new Pose2d(16.157, 7.043, Rotation2d.fromDegrees(-125.216))))), | ||
trailblazer.followSegment( | ||
new AutoSegment( | ||
new AutoConstraintOptions(false, 5, 500, 8.0, 500), | ||
new AutoPoint(new Pose2d(12.2, 5.5, Rotation2d.fromDegrees(-60.0))), | ||
new AutoPoint(new Pose2d(12.46, 5.16, Rotation2d.fromDegrees(-59.927)))))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
src/main/java/frc/robot/autos/trailblazer/trackers/PurePursuitPathTracker.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.