You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/moveit_task_constructor/moveit_task_constructor_tutorial.rst
+180Lines changed: 180 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,7 @@ shown in the right-most window. Selecting one of those solutions will start its
57
57
.. image:: images/mtc_show_stages.gif
58
58
:width:700px
59
59
60
+
.. _basic_concepts:
60
61
Basic Concepts
61
62
--------------
62
63
@@ -96,3 +97,182 @@ Examples are running alternative planners for a free-motion plan, picking object
96
97
Stages not only support solving motion planning problems.
97
98
They can also be used for all kinds of state transitions, as for instance modifying the planning scene.
98
99
Combined with the possibility of using class inheritance it is possible to construct very complex behavior while only relying on a well-structured set of primitive stages.
100
+
101
+
Programmatic Extension
102
+
----------------------
103
+
104
+
You may find that the available stages do not suffice the needs of your application.
105
+
Given this situation, you have the option to derive your own classes from core
106
+
stage types and implement custom functionality. Your choice of core class determines
107
+
the structure, i.e. the `flow path` of incoming and outgoing data with respect to
108
+
your new stage.
109
+
110
+
Overview of core classes
111
+
^^^^^^^^^^^^^^^^^^^^^^^^
112
+
113
+
The section :ref:`basic_concepts` in this tutorial provides an overview of the stage types
114
+
together with result propagation directions that are available for programmatic extension.
115
+
Remember: Core classes define result flow.
116
+
For example, to specify bi-directional result propagation, you might derive from the
117
+
``Generator`` class.
118
+
You will find this pattern if you take a look at the ``CurrentState`` stage,
119
+
which `generates` the current state of the planning scene and forwards it to both interfaces.
120
+
121
+
When deriving from one of the core classes, you need to implement your new computation in
122
+
the provided virtual functions. This ensures that the `MTC` backend can call your code
123
+
in the right place when traversing through the task hierarchy.
124
+
The following table provides an overview of these functions as well as giving more,
125
+
already implemented, examples of programmatic extension stages.
0 commit comments