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

Function main

btcpp_ros2_samples/src/subscriber_test.cpp:43–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 )";
42
43int main(int argc, char** argv)
44{
45 rclcpp::init(argc, argv);
46 auto nh = std::make_shared<rclcpp::Node>("subscriber_test");
47
48 BehaviorTreeFactory factory;
49
50 RosNodeParams params;
51 params.nh = nh;
52 params.default_port_value = "btcpp_string";
53 factory.registerNodeType<ReceiveString>("ReceiveString", params);
54
55 auto tree = factory.createTreeFromText(xml_text);
56
57 while(rclcpp::ok())
58 {
59 tree.tickWhileRunning();
60 }
61
62 return 0;
63}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected