Skip to content

Commit bf74e3e

Browse files
committed
update: on_success abort cancelled description added
Signed-off-by: d.kotov <moveton40@gmail.com>
1 parent be7ac48 commit bf74e3e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tutorials/docs/integrating_new_task_server_and_navigator_plugin.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,18 @@ Implementation (``src/action/set_blade_state.cpp``):
310310
goal_.enable = enable;
311311
}
312312
313+
``on_success()``, ``on_aborted()``, and ``on_cancelled()`` are not overridden here — the ``BtActionNode`` base class defaults apply. If they were explicitly written out, they would look like this:
314+
315+
.. code-block:: cpp
316+
317+
BT::NodeStatus SetBladeState::on_success() { return BT::NodeStatus::SUCCESS; }
318+
BT::NodeStatus SetBladeState::on_aborted() { return BT::NodeStatus::FAILURE; }
319+
BT::NodeStatus SetBladeState::on_cancelled() { return BT::NodeStatus::SUCCESS; }
320+
321+
Override these in your own node when you need to extract result fields, publish feedback, or return a non-default status.
322+
323+
.. code-block:: cpp
324+
313325
BT_REGISTER_NODES(factory)
314326
{
315327
BT::NodeBuilder builder = [](const std::string & name,

0 commit comments

Comments
 (0)