-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
back port from 2024 robot code (#101)
* put tuning auto paths in PathPlanner folders * adjust PathPlanner defaults for 2024 robot * add start point auto that sets the robot's pose to the specified position * run follow path warmup command in robotInit to force loading of PathPlanner's Java classes * update to latest vendor deps * display LEDs and DIO ports in the sim GUI * add workaround from CTRE to ensure that the CANivore has been enumerated by the root hub and therefore, hoot files will be properly generated * add DEMO_MODE to Constants that slows robot's velocity and displays alternative LED patterns * add names to all scheduled commands to facilitate debugging * consolidate management of current alliance color in Field2d singleton * add ability to override rotation during PathPlanner paths (useful for targeting) * constrain the robot pose to stay on the field, which doesn't happen when the wheels slip when colliding with the field walls * reset the robot's pose to the previous pose when the pose "teleports" (i.e., changes much more than possible); why this happens rarely is still not understood but may have something to do with vision pose estimates with invalid timestamps * add accessor to get measured angular velocity of the drivetrain * add accessor to get the estimated robot pose in the future based on current velocity * tuned system test for drivetrain * add enabled inputs for drive and steer motors * fix bug where swerve states in inputs were not initialized * use new initial configs for drie and steer motors in CTRE's SwerveModuleConstantsFactory to specify current limits * fix bug where closed loop reference and error signals were not associated with current control mode and, therefore, returning invalid values * use TorqueCurrentFOC for steer control in simulation to match physical robot (CTRE fixed bug preventing this) * add constants for MK4i L3+ * tune current limits for swerve drive motors * remove swerve drive characterization autos (need to use separate project with SysId) * add auto command to characterize swerve wheel diameter based on 6328's clever technique * remove duplicate auto finished pulse in LEDs class * remove distraction LED pattern * add fire LED pattern * add orange pulse LED pattern * add support for GRB LED strips connected to roboRIO * count how many times each camera provides a new estimated pose * add ambiguity threshold for including estimated poses from vision * attempt to mitigate impact of NT4 bug where timestamps may be in the future by applying a ceiling of the current time * only provide a vision-based robot pose if the data is less than 0.5 seconds old * tune function to calculate standard deviation for vision pose estimates * add input to capture if the estimate is from seeing multiple tags * fix bug where multi-tag poses would have an ambiguity of 0, which would result in standard deviations that were too low * fix simulation bug where the PhotonPoseEstimator needs to be provided with the transform from the camera to the robot * fix simulation bug where cameras added to the vision system sim don't need to have transform applied * remove 2023 robot configurations * add 2024 Artemis robot configurations * add practice board configuration for testing off-robot with basic electrical board * add method to determine if the robot has complete left the alliance side of the field (useful in auto) * change behavior of reset pose to vision to wait until a recent vision pose estimate is available before applying * allow all physical toggle switches to trigger when disabled (avoids need to force toggle when enabled) * fix bug in DriveToPose to account for blue field origin
- Loading branch information
Showing
40 changed files
with
2,270 additions
and
452 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
{ | ||
"robotWidth": 0.8382, | ||
"robotLength": 0.8382, | ||
"robotWidth": 0.88, | ||
"robotLength": 0.88, | ||
"holonomicMode": true, | ||
"pathFolders": [], | ||
"autoFolders": [], | ||
"defaultMaxVel": 3.0, | ||
"defaultMaxAccel": 10.0, | ||
"defaultMaxAngVel": 561.96, | ||
"defaultMaxAngAccel": 2066.2, | ||
"maxModuleSpeed": 3.644 | ||
"pathFolders": [ | ||
"Tuning" | ||
], | ||
"autoFolders": [ | ||
"Tuning" | ||
], | ||
"defaultMaxVel": 3.25, | ||
"defaultMaxAccel": 6.948, | ||
"defaultMaxAngVel": 530.0, | ||
"defaultMaxAngAccel": 2005.0, | ||
"maxModuleSpeed": 3.88 | ||
} |
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 |
---|---|---|
|
@@ -20,6 +20,6 @@ | |
] | ||
} | ||
}, | ||
"folder": null, | ||
"folder": "Tuning", | ||
"choreoAuto": true | ||
} |
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,25 @@ | ||
{ | ||
"version": 1.0, | ||
"startingPose": { | ||
"position": { | ||
"x": 2.3661772442028295, | ||
"y": 7.31444420234812 | ||
}, | ||
"rotation": 0 | ||
}, | ||
"command": { | ||
"type": "sequential", | ||
"data": { | ||
"commands": [ | ||
{ | ||
"type": "path", | ||
"data": { | ||
"pathName": "Start Point" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"folder": null, | ||
"choreoAuto": false | ||
} |
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 |
---|---|---|
|
@@ -20,6 +20,6 @@ | |
] | ||
} | ||
}, | ||
"folder": null, | ||
"folder": "Tuning", | ||
"choreoAuto": false | ||
} |
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
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
Oops, something went wrong.