The Promise of Deffered/Proxy #180
Replies: 1 comment
-
To expand on this even more, there is an issue with Pathplanner and The steps happen in order:
We were having an issue today that is related to what this discussion post talks about. We have a custom The root of this issue was due to the reference of the original command not being updated to the new We can resolve this issue by running the |
Beta Was this translation helpful? Give feedback.
-
Let's start with what a
Deferred Command
and aProxy Command
are.There are two things that both of these commands have in common: they both wait until the Command is run to initialize the Command. This is explained visually inside of the tldraw drawing board
The main difference between these commands is that the
Proxy Command
will "remove" any usage of subsystems in the Command, and theDeffer Command
still requires a Subsystem requirement.One thing to note is that the
Proxy Command
doesn't really remove any subsystem requirements but sidesteps the issue, stopping the current Command if the current requirement is used somewhere else along that Command Group.Especially for #179, this can lead to issues with scheduling path Commands that may use multiple requirements of the same subsystem. This leads to the path not being finished and ending up stopping midway through.
So, how can we resolve this problem (specifically in reference to 179)? We need to figure out some way to get the subsystem requirements and add them to the scheduled named commands, essentially making the named command proxied (by not carrying about the subsystems) but still having all of the requirements (making them not proxied).
Well I am sure that you have guessed by now, but we can do this with
Deffered Commands
by setting the subsystem requirements on the creation of a new Command, using the current requirements in the sequential command group, so by the end of the loop, we add all of the subsystems that are inside any command being scheduled.Beta Was this translation helpful? Give feedback.
All reactions