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
@@ -62,6 +62,7 @@ shown in the right-most window. Selecting one of those solutions will start its
62
62
.. image:: images/mtc_show_stages.gif
63
63
:width:700px
64
64
65
+
.. _basic_concepts:
65
66
Basic Concepts
66
67
--------------
67
68
@@ -101,3 +102,182 @@ Examples are running alternative planners for a free-motion plan, picking object
101
102
Stages not only support solving motion planning problems.
102
103
They can also be used for all kinds of state transitions, as for instance modifying the planning scene.
103
104
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.
105
+
106
+
Programmatic Extension
107
+
----------------------
108
+
109
+
You may find that the available stages do not suffice the needs of your application.
110
+
Given this situation, you have the option to derive your own classes from core
111
+
stage types and implement custom functionality. Your choice of core class determines
112
+
the structure, i.e. the `flow path` of incoming and outgoing data with respect to
113
+
your new stage.
114
+
115
+
Overview of core classes
116
+
^^^^^^^^^^^^^^^^^^^^^^^^
117
+
118
+
The section :ref:`basic_concepts` in this tutorial provides an overview of the stage types
119
+
together with result propagation directions that are available for programmatic extension.
120
+
Remember: Core classes define result flow.
121
+
For example, to specify bi-directional result propagation, you might derive from the
122
+
``Generator`` class.
123
+
You will find this pattern if you take a look at the ``CurrentState`` stage,
124
+
which `generates` the current state of the planning scene and forwards it to both interfaces.
125
+
126
+
When deriving from one of the core classes, you need to implement your new computation in
127
+
the provided virtual functions. This ensures that the `MTC` backend can call your code
128
+
in the right place when traversing through the task hierarchy.
129
+
The following table provides an overview of these functions as well as giving more,
130
+
already implemented, examples of programmatic extension stages.
0 commit comments