-
Notifications
You must be signed in to change notification settings - Fork 22
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
Flexible task definitions #39
Conversation
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #39 +/- ##
==========================================
- Coverage 38.76% 35.16% -3.61%
==========================================
Files 29 64 +35
Lines 1656 2420 +764
Branches 1002 1322 +320
==========================================
+ Hits 642 851 +209
- Misses 248 567 +319
- Partials 766 1002 +236
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
I noticed that there is an but also a Activator alias to Would it be confusing? |
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: youliang <[email protected]>
* Cherry pick diff for PerformAction from new_descriptions Signed-off-by: Yadunund <[email protected]> * Add missing utils Signed-off-by: Yadunund <[email protected]> * Add category to PerformAction make Signed-off-by: Yadunund <[email protected]> * Fix bug in estimate_remaining_time() Signed-off-by: Yadunund <[email protected]> * Update utils Signed-off-by: Yadunund <[email protected]> * Update copyright Signed-off-by: Yadunund <[email protected]>
Signed-off-by: youliang <[email protected]>
* Fix bad optional Signed-off-by: Yadunund <[email protected]> * Fix segfaults Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Xi Yu Oh <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
This is a draft PR for prototyping and discussing the redesign that was initially brought here. As of right now most of the new classes are unimplemented, but I think it's worth discussing the proposed APIs sooner rather than later. I'm still very open to renaming or reorganizing the API names/structures. Since all the interfaces are still very abstract, it may be difficult to understand, but I'll attempt to have some example classes implemented early next week to make this proposal more clear.
Most of the changes are based on this discussion, but I'll highlight some aspects where this PR diverges a bit from what was originally proposed:
A Task is an object that generates phases
In the original discussion I proposed that a Task should be a sequence of phases. After some more thinking and conversations, I concluded that this is too rigid of a definition. Instead I'm proposing an API where a Task is an object that generates phases. The way a Task generates phases is completely up to the implementer. This allows more complex Task behavior than we were originally targeting, including the possibility of implementing behavior trees which was proposed by @aarushg22.
For developer convenience, we will be providing a Task implementation called
rmf_task::sequence::Task
which is a Task that is defined by a sequence of phases. This is what was originally proposed, but now it's simply one way to define a task, not the only way.Planning is effectively the same
Besides some refactoring/renaming, all the APIs for task planning remain effectively the same. The new phase sequence task type has its own implementation of the
Request::Description
interface. Other task types can implement their ownRequest::Description
interfaces with no regard for the phase sequence task type.Tasks are generated by factories
The new class
rmf_task::execute::TaskFactory
is able to convert armf_task::Request
into an active, runningTask
object. A phase sequence task will be generated by this factory whenever such a task is requested. Downstream developers can inject their own custom task types into this factory.The new class
rmf_task::sequence::PhaseFactory
is able to convert from a phase description into an active, running phase for the newrmf_task::sequence::Task
class. Downstream developers can inject their own custom phase types into this factory.