-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set_tank
should disable the PID
#52
Comments
So how would one make the robot drive say 10 inches at full speed without using PID? Tried using "move_relative" but it didn't work after running the PID. As far as I know, we can only use either pid OR move_relative. |
While I haven't tested it, something like the below should work. Setting the PID mode to void my_move_relative(double position, double velocity) {
for (auto i : chassis.left_motors) {
i.move_relative(position, velocity);
}
for (auto i : chassis.right_motors) {
i.move_relative(position, velocity);
}
}
void autonomous() {
chassis.set_drive_pid(12, DRIVE_SPEED);
chassis.wait_drive();
chassis.set_mode(ez::DISABLE);
my_move_relative(1000, 200);
} |
* Fixed rotation sensor tick per rev (#47) * middle step for #49 and #54 * Added piston groups (#54) * Completed small issues (#56, #55, $54, #52, #48) * Finished with clean up on constants * Added set ratio function * Added practice mode * Updated PROS Kernel, okapi, fixed #53, general cleaning * ✨Okapi units (#49, #62) * ✨ Added `set_relative_turn_pid()` (#59) * issue #59 - add set_relative_turn_pid function, no issue - fix various cases of wrong function documentation * issue #59 - set_relative_turn_pid changed casing of variables to snake_case and made it relative to current target, not current heading * Fixed issue #67 * ✨Okapi units * New function names #65 * Added okapi units to turns and time, tuned PID, cleaned code, completed #66 * Fixed some names, added `get` functions #73 * Added more gets, removed version # from print #73 The version number in `ez_template_print` was redundant when version can be checked through pros cli. * ⬆️ Update Kernel/Okapi to 3.8.0 and 4.8.0 Respectively (#76) * Memory optimisation and comments: when a function is static, it doesn't need to exist for every object. Since this function does not reference any internal variables, it can be static * Maybe I was wrong * add new website code * added running the site locally * kernel upgrade * Update Kernel/Okapi --------- Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> * Added Ability for user to reverse Drive in opcontrol (#80) * Update drive.hpp weird changes * Added Reversal to opcontrol driving * mistake deleting active break logic, added back * Removed old website, updated readme * Completed #82, fixed formatting * Cleaned relative turns, added wide swings #59 #83 * Added slew to turns and swings, fixed wide arc bug #59 #83 #84 Backwards right arcs would have the left PID go the wrong direction. * #49 #59 #65 #84 All functions that have a parameter using okapi units has the ability to be called without using okapi units. Fixed relative bug that would stop a swing from working off of a turn Naming convention was fixed on setting constants. Forward and Reverse PID for swings was implemented. * namespaced all classes, removed piston group. #50 #54 * Added PID Tuner #85 * PID Tuner can modify increments #85 #86 #87 PID Tuner: - printing to brain can now be toggled - won't enable autonselector if it wasn't on prior to enabling PID Tuner - user can set all increments - user can get all increments - renamed functions to be compliant with #65 Completed #86 and #87 * Cleaned example files * Added example project to this repo and made v3 template * Final update for 3.0.0 #65 --------- Co-authored-by: HakopZarikyan <[email protected]> Co-authored-by: Michael Ben-Zvi <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Mactar Gueye <[email protected]>
commit 600bc47 Author: Jess Zarchi <[email protected]> Date: Sun Jan 28 23:53:53 2024 -0800 Removed 2.x files commit 6f6c701 Author: Jess Zarchi <[email protected]> Date: Sun Jan 28 23:45:42 2024 -0800 v3.0.0 (#88) * Fixed rotation sensor tick per rev (#47) * middle step for #49 and #54 * Added piston groups (#54) * Completed small issues (#56, #55, $54, #52, #48) * Finished with clean up on constants * Added set ratio function * Added practice mode * Updated PROS Kernel, okapi, fixed #53, general cleaning * ✨Okapi units (#49, #62) * ✨ Added `set_relative_turn_pid()` (#59) * issue #59 - add set_relative_turn_pid function, no issue - fix various cases of wrong function documentation * issue #59 - set_relative_turn_pid changed casing of variables to snake_case and made it relative to current target, not current heading * Fixed issue #67 * ✨Okapi units * New function names #65 * Added okapi units to turns and time, tuned PID, cleaned code, completed #66 * Fixed some names, added `get` functions #73 * Added more gets, removed version # from print #73 The version number in `ez_template_print` was redundant when version can be checked through pros cli. * ⬆️ Update Kernel/Okapi to 3.8.0 and 4.8.0 Respectively (#76) * Memory optimisation and comments: when a function is static, it doesn't need to exist for every object. Since this function does not reference any internal variables, it can be static * Maybe I was wrong * add new website code * added running the site locally * kernel upgrade * Update Kernel/Okapi --------- Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> * Added Ability for user to reverse Drive in opcontrol (#80) * Update drive.hpp weird changes * Added Reversal to opcontrol driving * mistake deleting active break logic, added back * Removed old website, updated readme * Completed #82, fixed formatting * Cleaned relative turns, added wide swings #59 #83 * Added slew to turns and swings, fixed wide arc bug #59 #83 #84 Backwards right arcs would have the left PID go the wrong direction. * #49 #59 #65 #84 All functions that have a parameter using okapi units has the ability to be called without using okapi units. Fixed relative bug that would stop a swing from working off of a turn Naming convention was fixed on setting constants. Forward and Reverse PID for swings was implemented. * namespaced all classes, removed piston group. #50 #54 * Added PID Tuner #85 * PID Tuner can modify increments #85 #86 #87 PID Tuner: - printing to brain can now be toggled - won't enable autonselector if it wasn't on prior to enabling PID Tuner - user can set all increments - user can get all increments - renamed functions to be compliant with #65 Completed #86 and #87 * Cleaned example files * Added example project to this repo and made v3 template * Final update for 3.0.0 #65 --------- Co-authored-by: HakopZarikyan <[email protected]> Co-authored-by: Michael Ben-Zvi <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Mactar Gueye <[email protected]>
* v3.0.0 (#88) * Fixed rotation sensor tick per rev (#47) * middle step for #49 and #54 * Added piston groups (#54) * Completed small issues (#56, #55, $54, #52, #48) * Finished with clean up on constants * Added set ratio function * Added practice mode * Updated PROS Kernel, okapi, fixed #53, general cleaning * ✨Okapi units (#49, #62) * ✨ Added `set_relative_turn_pid()` (#59) * issue #59 - add set_relative_turn_pid function, no issue - fix various cases of wrong function documentation * issue #59 - set_relative_turn_pid changed casing of variables to snake_case and made it relative to current target, not current heading * Fixed issue #67 * ✨Okapi units * New function names #65 * Added okapi units to turns and time, tuned PID, cleaned code, completed #66 * Fixed some names, added `get` functions #73 * Added more gets, removed version # from print #73 The version number in `ez_template_print` was redundant when version can be checked through pros cli. * ⬆️ Update Kernel/Okapi to 3.8.0 and 4.8.0 Respectively (#76) * Memory optimisation and comments: when a function is static, it doesn't need to exist for every object. Since this function does not reference any internal variables, it can be static * Maybe I was wrong * add new website code * added running the site locally * kernel upgrade * Update Kernel/Okapi --------- Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> * Added Ability for user to reverse Drive in opcontrol (#80) * Update drive.hpp weird changes * Added Reversal to opcontrol driving * mistake deleting active break logic, added back * Removed old website, updated readme * Completed #82, fixed formatting * Cleaned relative turns, added wide swings #59 #83 * Added slew to turns and swings, fixed wide arc bug #59 #83 #84 Backwards right arcs would have the left PID go the wrong direction. * #49 #59 #65 #84 All functions that have a parameter using okapi units has the ability to be called without using okapi units. Fixed relative bug that would stop a swing from working off of a turn Naming convention was fixed on setting constants. Forward and Reverse PID for swings was implemented. * namespaced all classes, removed piston group. #50 #54 * Added PID Tuner #85 * PID Tuner can modify increments #85 #86 #87 PID Tuner: - printing to brain can now be toggled - won't enable autonselector if it wasn't on prior to enabling PID Tuner - user can set all increments - user can get all increments - renamed functions to be compliant with #65 Completed #86 and #87 * Cleaned example files * Added example project to this repo and made v3 template * Final update for 3.0.0 #65 --------- Co-authored-by: HakopZarikyan <[email protected]> Co-authored-by: Michael Ben-Zvi <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Mactar Gueye <[email protected]> * Removed 2.x files * 3.0.1 * Revert "3.0.1" This reverts commit f0f633d. --------- Co-authored-by: HakopZarikyan <[email protected]> Co-authored-by: Michael Ben-Zvi <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Mactar Gueye <[email protected]>
* Squashed commit of the following: commit 600bc47 Author: Jess Zarchi <[email protected]> Date: Sun Jan 28 23:53:53 2024 -0800 Removed 2.x files commit 6f6c701 Author: Jess Zarchi <[email protected]> Date: Sun Jan 28 23:45:42 2024 -0800 v3.0.0 (#88) * Fixed rotation sensor tick per rev (#47) * middle step for #49 and #54 * Added piston groups (#54) * Completed small issues (#56, #55, $54, #52, #48) * Finished with clean up on constants * Added set ratio function * Added practice mode * Updated PROS Kernel, okapi, fixed #53, general cleaning * ✨Okapi units (#49, #62) * ✨ Added `set_relative_turn_pid()` (#59) * issue #59 - add set_relative_turn_pid function, no issue - fix various cases of wrong function documentation * issue #59 - set_relative_turn_pid changed casing of variables to snake_case and made it relative to current target, not current heading * Fixed issue #67 * ✨Okapi units * New function names #65 * Added okapi units to turns and time, tuned PID, cleaned code, completed #66 * Fixed some names, added `get` functions #73 * Added more gets, removed version # from print #73 The version number in `ez_template_print` was redundant when version can be checked through pros cli. * ⬆️ Update Kernel/Okapi to 3.8.0 and 4.8.0 Respectively (#76) * Memory optimisation and comments: when a function is static, it doesn't need to exist for every object. Since this function does not reference any internal variables, it can be static * Maybe I was wrong * add new website code * added running the site locally * kernel upgrade * Update Kernel/Okapi --------- Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> * Added Ability for user to reverse Drive in opcontrol (#80) * Update drive.hpp weird changes * Added Reversal to opcontrol driving * mistake deleting active break logic, added back * Removed old website, updated readme * Completed #82, fixed formatting * Cleaned relative turns, added wide swings #59 #83 * Added slew to turns and swings, fixed wide arc bug #59 #83 #84 Backwards right arcs would have the left PID go the wrong direction. * #49 #59 #65 #84 All functions that have a parameter using okapi units has the ability to be called without using okapi units. Fixed relative bug that would stop a swing from working off of a turn Naming convention was fixed on setting constants. Forward and Reverse PID for swings was implemented. * namespaced all classes, removed piston group. #50 #54 * Added PID Tuner #85 * PID Tuner can modify increments #85 #86 #87 PID Tuner: - printing to brain can now be toggled - won't enable autonselector if it wasn't on prior to enabling PID Tuner - user can set all increments - user can get all increments - renamed functions to be compliant with #65 Completed #86 and #87 * Cleaned example files * Added example project to this repo and made v3 template * Final update for 3.0.0 #65 --------- Co-authored-by: HakopZarikyan <[email protected]> Co-authored-by: Michael Ben-Zvi <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Mactar Gueye <[email protected]> * Fixed small bugs, refactoring #89, #90, #91, #92) * Fixed typo in comment, updated readme * Upgraded kernel, ready for v3.0.1 release
* Fixed rotation sensor tick per rev (#47) * middle step for #49 and #54 * Added piston groups (#54) * Completed small issues (#56, #55, $54, #52, #48) * Finished with clean up on constants * Added set ratio function * Added practice mode * Updated PROS Kernel, okapi, fixed #53, general cleaning * ✨Okapi units (#49, #62) * ✨ Added `set_relative_turn_pid()` (#59) * issue #59 - add set_relative_turn_pid function, no issue - fix various cases of wrong function documentation * issue #59 - set_relative_turn_pid changed casing of variables to snake_case and made it relative to current target, not current heading * Fixed issue #67 * ✨Okapi units * New function names #65 * Added okapi units to turns and time, tuned PID, cleaned code, completed #66 * Fixed some names, added `get` functions #73 * Added more gets, removed version # from print #73 The version number in `ez_template_print` was redundant when version can be checked through pros cli. * ⬆️ Update Kernel/Okapi to 3.8.0 and 4.8.0 Respectively (#76) * Memory optimisation and comments: when a function is static, it doesn't need to exist for every object. Since this function does not reference any internal variables, it can be static * Maybe I was wrong * add new website code * added running the site locally * kernel upgrade * Update Kernel/Okapi --------- Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> * Added Ability for user to reverse Drive in opcontrol (#80) * Update drive.hpp weird changes * Added Reversal to opcontrol driving * mistake deleting active break logic, added back * Removed old website, updated readme * Completed #82, fixed formatting * Cleaned relative turns, added wide swings #59 #83 * Added slew to turns and swings, fixed wide arc bug #59 #83 #84 Backwards right arcs would have the left PID go the wrong direction. * #49 #59 #65 #84 All functions that have a parameter using okapi units has the ability to be called without using okapi units. Fixed relative bug that would stop a swing from working off of a turn Naming convention was fixed on setting constants. Forward and Reverse PID for swings was implemented. * namespaced all classes, removed piston group. #50 #54 * Added PID Tuner #85 * PID Tuner can modify increments #85 #86 #87 PID Tuner: - printing to brain can now be toggled - won't enable autonselector if it wasn't on prior to enabling PID Tuner - user can set all increments - user can get all increments - renamed functions to be compliant with #65 Completed #86 and #87 * Cleaned example files * Added example project to this repo and made v3 template * Final update for 3.0.0 #65 * Squashed commit of the following: commit 600bc47 Author: Jess Zarchi <[email protected]> Date: Sun Jan 28 23:53:53 2024 -0800 Removed 2.x files commit 6f6c701 Author: Jess Zarchi <[email protected]> Date: Sun Jan 28 23:45:42 2024 -0800 v3.0.0 (#88) * Fixed rotation sensor tick per rev (#47) * middle step for #49 and #54 * Added piston groups (#54) * Completed small issues (#56, #55, $54, #52, #48) * Finished with clean up on constants * Added set ratio function * Added practice mode * Updated PROS Kernel, okapi, fixed #53, general cleaning * ✨Okapi units (#49, #62) * ✨ Added `set_relative_turn_pid()` (#59) * issue #59 - add set_relative_turn_pid function, no issue - fix various cases of wrong function documentation * issue #59 - set_relative_turn_pid changed casing of variables to snake_case and made it relative to current target, not current heading * Fixed issue #67 * ✨Okapi units * New function names #65 * Added okapi units to turns and time, tuned PID, cleaned code, completed #66 * Fixed some names, added `get` functions #73 * Added more gets, removed version # from print #73 The version number in `ez_template_print` was redundant when version can be checked through pros cli. * ⬆️ Update Kernel/Okapi to 3.8.0 and 4.8.0 Respectively (#76) * Memory optimisation and comments: when a function is static, it doesn't need to exist for every object. Since this function does not reference any internal variables, it can be static * Maybe I was wrong * add new website code * added running the site locally * kernel upgrade * Update Kernel/Okapi --------- Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> * Added Ability for user to reverse Drive in opcontrol (#80) * Update drive.hpp weird changes * Added Reversal to opcontrol driving * mistake deleting active break logic, added back * Removed old website, updated readme * Completed #82, fixed formatting * Cleaned relative turns, added wide swings #59 #83 * Added slew to turns and swings, fixed wide arc bug #59 #83 #84 Backwards right arcs would have the left PID go the wrong direction. * #49 #59 #65 #84 All functions that have a parameter using okapi units has the ability to be called without using okapi units. Fixed relative bug that would stop a swing from working off of a turn Naming convention was fixed on setting constants. Forward and Reverse PID for swings was implemented. * namespaced all classes, removed piston group. #50 #54 * Added PID Tuner #85 * PID Tuner can modify increments #85 #86 #87 PID Tuner: - printing to brain can now be toggled - won't enable autonselector if it wasn't on prior to enabling PID Tuner - user can set all increments - user can get all increments - renamed functions to be compliant with #65 Completed #86 and #87 * Cleaned example files * Added example project to this repo and made v3 template * Final update for 3.0.0 #65 --------- Co-authored-by: HakopZarikyan <[email protected]> Co-authored-by: Michael Ben-Zvi <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Mactar Gueye <[email protected]> * Fixed small bugs, refactoring #89, #90, #91, #92) * Fixed typo in comment, updated readme * Upgraded kernel, ready for v3.0.1 release --------- Co-authored-by: HakopZarikyan <[email protected]> Co-authored-by: Michael Ben-Zvi <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Michael Barr <[email protected]> Co-authored-by: Asik007 <[email protected]> Co-authored-by: Sylvie <[email protected]> Co-authored-by: Will Xu <[email protected]> Co-authored-by: Mactar Gueye <[email protected]>
in auto, if a user wants to just set power to the drive, they currently have to
set_mode(ez::DISABLED)
, thenset_tank(127, 127)
.set_tank should disable PID for the user, and the pid tasks should use a different function for that is something like
The text was updated successfully, but these errors were encountered: