Skip to content

Commit

Permalink
Handle Goal is Lost STATE
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-sysdesign committed Sep 18, 2023
1 parent a6fee3b commit 88bde64
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CI"
name: "Continuous Integration"

on:
pull_request:
Expand All @@ -14,10 +14,10 @@ jobs:
os: [ubuntu-20.04]
steps:
- name: "Setup ROS"
uses: ros-tooling/setup-ros@v0.5
uses: ros-tooling/setup-ros@v0.6
with:
required-ros-distributions: noetic
- name: "Build & Test"
uses: ros-tooling/action-ros-ci@v0.2
uses: ros-tooling/action-ros-ci@v0.3
with:
target-ros1-distro: noetic
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## VS Code ##
#############
.vscode

# Prerequisites
*.d

Expand Down
7 changes: 6 additions & 1 deletion include/behaviortree_ros/bt_action_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ class RosActionNode : public BT::ActionNodeBase
enum FailureCause{
MISSING_SERVER = 0,
ABORTED_BY_SERVER = 1,
REJECTED_BY_SERVER = 2
REJECTED_BY_SERVER = 2,
GOAL_IS_LOST = 3
};

/// Called when a service call failed. Can be overriden by the user.
Expand Down Expand Up @@ -155,6 +156,10 @@ class RosActionNode : public BT::ActionNodeBase
{
return onFailedRequest( REJECTED_BY_SERVER );
}
else if( action_state == actionlib::SimpleClientGoalState::LOST)
{
return onFailedRequest( GOAL_IS_LOST );
}
else
{
// FIXME: is there any other valid state we should consider?
Expand Down

0 comments on commit 88bde64

Please sign in to comment.