SleipnirGroup / Choreo

A graphical tool for planning time-optimized trajectories for autonomous mobile robots in the FIRST Robotics Competition.
BSD 3-Clause "New" or "Revised" License
116 stars 35 forks source link

Decision Tree / Branching Path Autos #470

Open MidgleyM opened 2 months ago

MidgleyM commented 2 months ago

Description

Some sort of feature that allows the user to give a boolean input during the running of a path, and if it is true switch to another "branch" of the path.

Proposal

One way you get the input from the users code could be a boolean supplier or something that the user passes in, or similar to how triggers end up being done.

This feature in general seems like a massive ask. Right now, I think it would require reworking most of everything to make this work, but I don't know the code well enough to know how true that is. If it's ever worked on, then previous discussion would probably be nice to have. And for most people, knowing if it's even feasible or not would be nice to know.

fruzzmuffin commented 1 month ago

I think you can already do this at stop points by manually generating the path follower command until the stop point, then branching the command by using parallel .onlyIf and .unless decorators on the path following commands that you want to switch between.