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

Function main

btcpp_ros2_samples/src/bool_server.cpp:22–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22int main(int argc, char** argv)
23{
24 rclcpp::init(argc, argv);
25
26 std::shared_ptr<rclcpp::Node> node = rclcpp::Node::make_shared("add_two_ints_server");
27
28 auto serviceA =
29 node->create_service<std_srvs::srv::SetBool>("robotA/set_bool", &CallbackA);
30 auto serviceB =
31 node->create_service<std_srvs::srv::SetBool>("robotB/set_bool", &CallbackB);
32
33 RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "Ready.");
34
35 rclcpp::spin(node);
36 rclcpp::shutdown();
37}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected