Skip to content

Commit

Permalink
Added check in BT for empty tool paths (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSpielman authored Oct 9, 2024
1 parent 3a937da commit d0cb593
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions snp_application/src/bt/snp_bt_ros_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ BT::NodeStatus GenerateToolPathsServiceNode::onResponseReceived(const typename R
return BT::NodeStatus::FAILURE;
}

if (response->tool_paths.empty())
{
config().blackboard->set(ERROR_MESSAGE_KEY, "Tool paths are empty! Check tool path planner parameters.");
return BT::NodeStatus::FAILURE;
}

// Copy the tool paths
std::vector<snp_msgs::msg::ToolPath> tool_paths = response->tool_paths;

Expand Down

0 comments on commit d0cb593

Please sign in to comment.