BehaviorTree.ROS2 icon indicating copy to clipboard operation
BehaviorTree.ROS2 copied to clipboard

terminate called after throwing an instance of 'rclcpp_action::exceptions::UnknownGoalHandleError' , what(): Goal handle is not known to this client.

Open Rizano1 opened this issue 10 months ago • 0 comments

tree:

<root BTCPP_format="4" main_tree_to_execute="MainTree" >
  <BehaviorTree ID="MainTree">
    <Repeat num_cycles="100">
      <Sequence>
        <Fallback name="MainSequence">
            <KeepRunningUntilFailure>
                <IsEmergencyOn default_status="SUCCESS"/>
            </KeepRunningUntilFailure>
              <ReactiveFallback>
                  <IsEmergencyOn />
                  <Sequence>
                      <MoveForward mode="time" value="5" joy_thrust="50"/>
                      <MoveForward mode="time" value="20" joy_thrust="50"/>
                  </Sequence>
              </ReactiveFallback>
        </Fallback>
      </Sequence>
    </Repeat>
  </BehaviorTree>
</root>

"IsEmergencyOn" is a sub-node/condition node, and "moveForward" is an action node. I am writing the behavior tree node and its server using an example as a reference.

I tried making IsEmergencyOn return SUCCESS in the middle of moveForward, causing the tree to restart due to repeat and getting blocked by KeepRunningUntilFailure until IsEmergencyOn returns FAILURE. I repeated this process multiple times, but after several repeats, an error occurred:

[behaviorNode-3] terminate called after throwing an instance of 'rclcpp_action::exceptions::UnknownGoalHandleError' [behaviorNode-3] what(): Goal handle is not known to this client. [ERROR] [behaviorNode-3]: process has died [pid 16286, exit code -6, cmd '/home/banyubramanta/Documents/ros2_ws_sauvc_2025/install/banyu_behavior_client/lib/banyu_behavior_client/behaviorNode --ros-args -r __node:=behaviorNode'].

Rizano1 avatar Feb 21 '25 21:02 Rizano1