-
Notifications
You must be signed in to change notification settings - Fork 163
Conditional Command group and Wait Until with Named Conditionals #923
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
base: main
Are you sure you want to change the base?
Conversation
Add NamedCondition Add conditional command group
|
Fixes #609 |
|
Sorry for just leaving this open for a while, but this is something I've decided a while ago that I would not add to PathPlanner/PPLib. The command group building stuff is really designed for just doing simple/basic stuff, making it easier for teams with little to no auto experience to put together a simple auto. Conditional stuff is more complex functionality that would pretty much only be used by teams capable of creating auto command groups in code anyways. Plus, having that capability in the GUI doesn't really make it any easier to use conditionals, in some cases making it more difficult, as you have to add a named conditional, build the conditional command in the gui, then you have to keep track of the separate implementations of the conditional/group in the code/gui, and it becomes super difficult to debug. Basically, I think its just a whole lot easier/safer to build conditional commands/autos in code. I wouldn't ever recommend someone to use something like this over just manually building it in code, so adding it to the library and having to maintain it going forward just doesn't make sense. For #721 I have ideas/plans on how to handle it sort of like a behavior tree, using a blackboard that the user can control in code instead of using a "NamedConditionals" setup. But, this can't be extended to work within command groups without some significant library restructuring and hacking to get it to work. So, conditional stuff will probably just live in a level above the auto command groups. However, I think this will mostly accomplish what this PR is trying to achieve anyways, since the tree would be able to satisfy the use case for the "conditional group", and conditional waits and stuff like that can always just be bound to a named command. Anyways, anything significant in respect to any sort of conditional features would not be added for 2025 anyways, as its just too significant a change to make this close to kickoff. |
Conditional command groups are interesting additions to Autos that will allow for conditionally changing pathing if a game piece was not picked up for example.
Wait until commands will allow for running a path until some condition is met. This could be used for running a specific path along a line of gamepieces while trying to pick them up until a gamepiece is detected in the robot.
NamedConditions are very similar to NamedCommands in the GUI and libraries
Example auto mode using wait until and conditional group
