MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.ROS2 / onResponseReceived

Method onResponseReceived

btcpp_ros2_samples/src/set_bool_node.cpp:10–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8}
9
10BT::NodeStatus SetBoolService::onResponseReceived(const Response::SharedPtr& response)
11{
12 std::cout << "onResponseReceived " << std::endl;
13 if(response->success)
14 {
15 RCLCPP_INFO(logger(), "SetBool service succeeded.");
16 return BT::NodeStatus::SUCCESS;
17 }
18 else
19 {
20 RCLCPP_INFO(logger(), "SetBool service failed: %s", response->message.c_str());
21 return BT::NodeStatus::FAILURE;
22 }
23}
24
25BT::NodeStatus SetBoolService::onFailure(BT::ServiceNodeErrorCode error)
26{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected