| 21 | )"; |
| 22 | |
| 23 | int main(int argc, char** argv) |
| 24 | { |
| 25 | rclcpp::init(argc, argv); |
| 26 | auto nh = std::make_shared<rclcpp::Node>("bool_client"); |
| 27 | |
| 28 | BehaviorTreeFactory factory; |
| 29 | |
| 30 | // version with default port |
| 31 | factory.registerNodeType<SetBoolService>("SetBoolA", BT::RosNodeParams(nh, "robotA/" |
| 32 | "set_bool")); |
| 33 | |
| 34 | // version without default port |
| 35 | factory.registerNodeType<SetBoolService>("SetBool", BT::RosNodeParams(nh)); |
| 36 | |
| 37 | // namespace version |
| 38 | factory.registerNodeType<SetRobotBoolService>("SetRobotBool", nh, "set_bool"); |
| 39 | |
| 40 | auto tree = factory.createTreeFromText(xml_text); |
| 41 | |
| 42 | tree.tickWhileRunning(); |
| 43 | |
| 44 | return 0; |
| 45 | } |
nothing calls this directly
no test coverage detected