Skip to content

Commit

Permalink
address error_msg review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Wake <[email protected]>
  • Loading branch information
aosmw committed Sep 7, 2024
1 parent 23e4b92 commit ed98c63
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ In conclusion, this particular BT would serve, both as an example and ready-to-u
<ClearEntireCostmap name="ClearLocalCostmap-Subtree" service_name="local_costmap/clear_entirely_local_costmap"/>
<ClearEntireCostmap name="ClearGlobalCostmap-Subtree" service_name="global_costmap/clear_entirely_global_costmap"/>
</Sequence>
<Spin spin_dist="1.57"/>
<Spin spin_dist="1.57" error_code_id="{spin_error_code}" error_msg="{spin_error_msg}"/>
<Wait wait_duration="5.0"/>
<BackUp backup_dist="0.30" backup_speed="0.05"/>
<BackUp backup_dist="0.30" backup_speed="0.05" error_code_id="{backup_error_code}" error_msg="{backup_error_msg}"/>
</RoundRobin>
</ReactiveFallback>
</RecoveryNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ While this behavior tree does not make use of it, the ``PlannerSelector``, ``Con
<ClearEntireCostmap name="ClearLocalCostmap-Subtree" service_name="local_costmap/clear_entirely_local_costmap"/>
<ClearEntireCostmap name="ClearGlobalCostmap-Subtree" service_name="global_costmap/clear_entirely_global_costmap"/>
</Sequence>
<Spin name="SpinRecovery" spin_dist="1.57"/>
<Spin name="SpinRecovery" spin_dist="1.57" error_code_id="{spin_error_code}" error_msg="{spin_error_msg}"/>
<Wait name="WaitRecovery" wait_duration="5.0"/>
<BackUp name="BackUpRecovery" backup_dist="0.30" backup_speed="0.05"/>
<BackUp name="BackUpRecovery" backup_dist="0.30" backup_speed="0.05" error_code_id="{backup_error_code}" error_msg="{backup_error_msg}"/>
</RoundRobin>
</ReactiveFallback>
</RecoveryNode>
Expand Down
23 changes: 12 additions & 11 deletions migration/Jazzy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ Jazzy to K-Turtle

Moving from ROS 2 Jazzy to K-Turtle, a number of stability improvements were added that we will not specifically address here.

BehaviorTree error_msg
**********************

`PR #4459 https://github.com/ros-navigation/navigation2/pull/4459>`_ adds error_msg to all action result messages
`PR #4460 <https://github.com/ros-navigation/navigation2/pull/4460>`_ captures and propagates error_msg result strings through the bt_navigator.

A new parameter for the BT Navigator "error_code_name_prefixes" was introduced. It replaces the "error_code_id_names" parameter to support both an error code and an associated error message. Behavior tree elements that support an "error_code_id" and "error_msg" attribute, must have values that use the corresponding prefix with the suffix "_error_code" and "_error_msg" respectively. The error messages can then be viewed by applications calling Nav2 or its servers for handling specific errors with more contextual information than simply the error code.

.. code-block:: xml
<ComputePathToPose goal="{goal}" path="{path}" planner_id="{selected_planner}" error_code_id="{compute_path_error_code} error_msg="{compute_path_error_msg}"/>
New Nav2 Loopback Simulator
***************************
Expand Down Expand Up @@ -82,14 +94,3 @@ After:
.. image:: images/fix_flickering_visualization_after.png
BehaviorTree error_msg
**********************

`PR #4459 https://github.com/ros-navigation/navigation2/pull/4459>`_ adds error_msg to all action result messages
`PR #4460 <https://github.com/ros-navigation/navigation2/pull/4460>`_ captures and propagates error_msg result strings through the bt_navigator.

A new parameter for the BT Navigator "error_code_name_prefixes" was introduced. It replaces the "error_code_id_names" parameter to support both an error code and an associated error message. Behavior tree elements that support an "error_code_id" and "error_msg" attribute, must have values that use the corresponding prefix with the suffix "_error_code" and "_error_msg" respectively.

.. code-block:: xml
<ComputePathToPose goal="{goal}" path="{path}" planner_id="{selected_planner}" error_code_id="{compute_path_error_code} error_msg="{compute_path_error_msg}"/>

0 comments on commit ed98c63

Please sign in to comment.