ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Nav2 Writing a New Behavior Plugin

asked 2023-02-13 23:59:52 -0600

Yuki Miyake gravatar image

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.

edit retag flag offensive close merge delete

Comments

I am also facing same issue for a decorator node

Vignesh T gravatar image Vignesh T  ( 2023-07-25 05:27:12 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-02-14 11:54:01 -0600

[bt_navigator-7] [ERROR] [1676352851.699134372] []: Original error: Error at line 37: -> Node not recognized: send_sms

The BT navigator parsing the file doesn't know the node you've marked as send_sms. You need to have that plugin registered with the BT Navigator for use. See BT Nav's documentation for the plugins list parameter for the associated BT node you've created.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-02-13 23:59:52 -0600

Seen: 489 times

Last updated: Feb 14 '23