| 64 | )"; |
| 65 | |
| 66 | int main(int argc, char** argv) |
| 67 | { |
| 68 | rclcpp::init(argc, argv); |
| 69 | auto nh = std::make_shared<rclcpp::Node>("sleep_client"); |
| 70 | |
| 71 | BehaviorTreeFactory factory; |
| 72 | |
| 73 | factory.registerNodeType<PrintValue>("PrintValue"); |
| 74 | |
| 75 | RosNodeParams params; |
| 76 | params.nh = nh; |
| 77 | params.default_port_value = "sleep_service"; |
| 78 | |
| 79 | #ifdef USE_SLEEP_PLUGIN |
| 80 | RegisterRosNode(factory, "../lib/libsleep_action_plugin.so", params); |
| 81 | #else |
| 82 | factory.registerNodeType<SleepAction>("SleepAction", params); |
| 83 | #endif |
| 84 | |
| 85 | auto tree = factory.createTreeFromText(xml_text); |
| 86 | |
| 87 | for(int i = 0; i < 5; i++) |
| 88 | { |
| 89 | tree.tickWhileRunning(); |
| 90 | } |
| 91 | |
| 92 | return 0; |
| 93 | } |
nothing calls this directly
no test coverage detected