Nav2 Writing a New Behavior Plugin
I am running a new behavior plugin tutorial on ros2galactic with reference to the document below. https://navigation.ros.org/plugin_tut...
Please tell me the reason for the following error.
[bt_navigator-7] [ERROR] [1676352851.699115317] []: Caught exception in callback for transition 13
[bt_navigator-7] [ERROR] [1676352851.699134372] []: Original error: Error at line 37: -> Node not recognized: send_sms
[bt_navigator-7] [WARN] [1676352851.699166162] []: Error occurred while doing error handling.
[bt_navigator-7] [FATAL] [1676352851.699178704] [bt_navigator]: Lifecycle node bt_navigator does not have error state implemented
[lifecycle_manager-9] [ERROR] [1676352851.699621767] [lifecycle_manager_navigation]: Failed to change state for node: bt_navigator
[lifecycle_manager-9] [ERROR] [1676352851.699658466] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup.
The main branch of the navigation_tutorial project is humble, but galactic can be found below. https://github.com/ros-planning/navig... Putting this code in ros2_ws/src made the build successful.
Next, I added send_sms after the recovery actions Spin, Wait, BackUp in the XML file of the behavior tree as shown below.
<root main_tree_to_execute="MainTree">
<BehaviorTree ID="MainTree">
<RecoveryNode number_of_retries="6" name="NavigateRecovery">
<PipelineSequence name="NavigateWithReplanning">
<RateController hz="1.0">
<RecoveryNode number_of_retries="1" name="ComputePathToPose">
<ComputePathToPose goal="{goal}" path="{path}" planner_id="GridBased"/>
<ReactiveFallback name="ComputePathToPoseRecoveryFallback">
<GoalUpdated/>
<ClearEntireCostmap name="ClearGlobalCostmap-Context" service_name="global_costmap/clear_entirely_global_costmap"/>
</ReactiveFallback>
</RecoveryNode>
</RateController>
<RecoveryNode number_of_retries="1" name="FollowPath">
<FollowPath path="{path}" controller_id="FollowPath"/>
<ReactiveFallback name="FollowPathRecoveryFallback">
<GoalUpdated/>
<ClearEntireCostmap name="ClearLocalCostmap-Context" service_name="local_costmap/clear_entirely_local_costmap"/>
</ReactiveFallback>
</RecoveryNode>
</PipelineSequence>
<ReactiveFallback name="RecoveryFallback">
<GoalUpdated/>
<RoundRobin name="RecoveryActions">
<Sequence name="ClearingActions">
<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"/>
<Wait wait_duration="5"/>
<BackUp backup_dist="0.15" backup_speed="0.025"/>
<send_sms/>
</RoundRobin>
</ReactiveFallback>
</RecoveryNode>
</BehaviorTree>
</root>
And replaced the params file with:
recoveries_server:
ros_parameters:
costmap_topic: local_costmap/costmap_raw
footprint_topic: local_costmap/published_footprint
cycle_frequency: 10.0
recovery_plugins: [spin, backup, wait, send_sms]
spin:
plugin: nav2_recoveries/Spin
backup:
plugin: nav2_recoveries/BackUp
wait:
plugin: nav2_recoveries/Wait
send_sms:
# plugin: nav2_sms_behavior/SendSms
plugin: nav2_sms_recovery/SMSRecovery
account_sid: A*********
auth_token: a*********
from_number: "**********"
to_number: "**********"
I build and try to start navigation, but I get the following error:
[bt_navigator-7] [ERROR] [1676352851.699115317] []: Caught exception in callback for transition 13
[bt_navigator-7] [ERROR] [1676352851.699134372] []: Original error: Error at line 37: -> Node not recognized: send_sms
[bt_navigator-7] [WARN] [1676352851.699166162] []: Error occurred while doing error handling.
[bt_navigator-7] [FATAL] [1676352851.699178704] [bt_navigator]: Lifecycle node bt_navigator does not have error state implemented
[lifecycle_manager-9] [ERROR] [1676352851.699621767] [lifecycle_manager_navigation]: Failed to change state for node: bt_navigator
[lifecycle_manager-9] [ERROR] [1676352851.699658466] [lifecycle_manager_navigation]: Failed to bring up all requested nodes.
Please let me know if you know the cause.
I am also facing same issue for a decorator node