Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add localization, drive classes, and field centric (#1)
* Add initial quickstart files * Bump dash * Remove AccelLogger from TuningOpModes (FIRST-Tech-Challenge#177) * Make Data fields in Logger OpModes public (FIRST-Tech-Challenge#179) * Fix CW turns * Hopefully fix track width regression * Fix DriveView setDrivePowers() * Bump dash * Fix action drawing * Update for new actions * Bump RR * Bump dash * Migrate to IMU interface * Add setDirection() to Encoder interface (fixes FIRST-Tech-Challenge#203) * Add logging behind the scenes * Move logging stuff * Use IMU heading in mecanum drive localizer (fixes FIRST-Tech-Challenge#215) * No intercept regression * Regression improvements * Fix drive powers * Correct velocity in ManualFeedforwardTuner * Record signals on Java side * Adapt regression to signals * Bump dash * Add link to quickstart2 docs (fixes FIRST-Tech-Challenge#217) * Fix tick units * Add localization test Also shorten some longer method names. * Bump RR * Move quickstart files to separate module * Remove tuning web files * Use RR FTC module * Update README.md * Bump RR FTC * Bump RR FTC * Bump RR FTC * Finish tank params refactor * Add more unit comments * Remove mecanum forward kinematics rotation factors * Rename dead wheel params * Bump deps * Bump RR FTC * Dead wheel overflow encoders by default * Bump RR FTC * Bump dash * Apply heading velocity correction in localizer * Change default `par1YTicks` This avoids populating `NaN` in odometry-derived values. * Remove outdated TODO * Fix feedback tuner start * Bump RR FTC * Add more dash tunables * Re-create feedforward objects * Pipe feedforward into drive view factory * Drive view use feedforward factory (fixes FIRST-Tech-Challenge#258) * Replace rear with back * Ensure 2 samples when drawing paths * Bump dash * Require odometry wheel positions to run ManualFeedbackTuner (FIRST-Tech-Challenge#292) * Add bug template * Fix yaml * Localization test degrees heading * Add missing imports * Add more debug messages * Replace `log()` with `toDouble()` * Log power commands * Bump RR FTC * Add TODO comments * Move drive encoder reversal before first get Changing the direction of an encoder after reading it the first time will create a potentially massive delta in the first odometry update. * Bump RR * Bump RR FTC * Always throw `RuntimeException` The FTC SDK only catches `Exception` thrown by user code, so switch all throwables to `RuntimeException`. * Add encoder reverse directions to dead wheel localizers Direction doesn't matter for position regression, but it does matter for `inPerTick`, `lateralInPerTick`. And everything makes more sense if the directions are correct. * Better spline test * Bump RR FTC * Set better default `lateralInPerTick` * Update to lazy IMU (fixes FIRST-Tech-Challenge#346) * Draw robot in LocalizationTest (fixes FIRST-Tech-Challenge#360) * Add drawing class * Stop reading localizer inputs on construction This ensures that any motion between construction and first update will be ignored (this is usually the period between init and start of an op mode). If teams want to track pose during that period, they can call `updatePoseEstimate()` explicitly. This matches the behavior of the 0.5.x localizers (without the annoying reset on every pose estimate set). The localizers also now log much more data to help troubleshoot localization issues in the future. * Rename `LazyImu` drive members Also makes sure the mecanum drive localizer fetches the IMU on construction. * Use new params * Bump RR * Bump RR * Bump dash * Added example code and driver to teamcode * Update README.md * Update README.md * Update README.md * Update README.md * Bump RR FTC (fixes #405) * Fix angular velocity Add workaround for FIRST-Tech-Challenge#1070 * Merge FTC SDK v10.1 Co-authored-by: Cal Kestis <[email protected]> Co-authored-by: Cal Kestis <[email protected]> * Added example code and driver to teamcode * Update README.md * Update README.md * Update README.md * Removed duplicate Pose2D class, added imports for FTC SDK Pose2D. * Update README.md changed README to reflect removing the duplicate Pose2D * Changed i2c read speed to 400khz, added an "update only pos" function. Needs more work to determine what the best "power user setup" is. * Added Overflow for update() to allow user to specify when only certain data gets updated. * Fixed typo on velocity read registers * Landed on overloading update function with the ability to only pull heading. Consider V2 having the ability to read just Position and just Velocity. * Added overflow to the update() method to allow only updating the IMU heading * Finalized faster i2c read speed improvements * Bugfix for Encoder Direction * Removed Incorrect Example * Update SensorGoBildaPinpointExample.java Removed a new line which was accidentally added * Fix tank drive turn min ang accel (fixes FIRST-Tech-Challenge#420) * Update README.md * Move DriveLocalizer classes out of the actual drive classes * move all of the localizers and then change them to implement updatePositionEstimate and updateVelocityEstimate instead of simply "update" * change MecanumDrive and TankDrive to use the new Localizer methods * update to follow recommendations from PR comments * add `pose` property back to not break backwards compatibility * remove OTOS example + change drive localizer class names to pre-PR versions * add janky checks to check if the `pose` property of the drive classes was changed directly and if so, setPose to the pose property so the localizer pose property is updated to match * Revert teamwebcamcalibrations.xml * move DriveLocalizers to their original spot in the drive class, delete localization subpackage; fold calculatePoseDelta into the localizer update methods * remove pose variable from drive class and delegate it solely to the localizer object * delete unneeded files * delete unneeded messages * cleaning up of localizer update methods as per latest review * add pinpoint localizer * make mecanumdrive use pinpoint localizer * add parameters to pinpoint localizer * add field centric powers function to mecanumdrive * make field centric accurate * refactor clutter to a single folder and fix errors --------- Co-authored-by: Ryan Brott <[email protected]> Co-authored-by: abidingabi <[email protected]> Co-authored-by: Ethan Doak <[email protected]> Co-authored-by: Ethan <[email protected]> Co-authored-by: Cal Kestis <[email protected]> Co-authored-by: Cal Kestis <[email protected]> Co-authored-by: Zach Harel <[email protected]> Co-authored-by: 0verkil <[email protected]>
- Loading branch information