moveit_task_constructor/core/doc/troubleshooting.rst
2023-12-04 01:51:17 -07:00

39 lines
2.0 KiB
ReStructuredText

.. _sec-troubleshooting:
Troubleshooting
===============
``Task::init()`` reports mismatching interfaces
-----------------------------------------------
Before planning, the planning pipeline is checked for consistency. Each stage type has a specific flow interface, e.g. generator-type stages write into both, their begin and end interface, propagator-type stages read from one and write to the opposite, and connector-type stages read from both sides. Obviously these interfaces need to match. If they don't, an ``InitStageException`` is thrown. Per default, this is not very verbose, but you can use the following code snippet to get some more info:
.. code-block:: c
try {
task.plan();
} catch (const InitStageException& e) {
std::cerr << e << std::endl;
throw;
}
For example, the following pipeline:
- ↕ current
- ⛓ connect
- ↑ moveTo
throws the error: ``task pipeline: end interface (←) of 'moveto' does not match mine (→)``.
The validation process runs sequentially through a ``SerialContainer``. Here, ``current``, as a generator stage is compatible to ``connect``, writing to the interface read by ``connect``.
``moveTo`` as a propagator can operate, in principle, forwards and backwards. By default, the operation direction is inferred automatically. Here, as ``connect`` requires a reading end-interface, moveTo should seemingly operate backwards. However, now the whole pipeline is incompatible to the enclosing container's interface: a task requires a generator-type interface as it generates solutions - there is no input interface to read from. Hence, the *reading* end interface (←) of ``moveto`` conflicts with a *writing* end interface of the task.
Obviously, in a ``ParallelContainer`` all (direct) children need to share a common interface.
Debugging using RViz
--------------------
The Motion Planning Tasks panel in RViz lists all the stages in the MTC task being executed.
Solutions for each stage can be examined by clicking on the stage name.
The failed solutions will contain descriptive reasons for failure.