23 lines
598 B
C++
23 lines
598 B
C++
#include <iostream>
|
|
|
|
#include "mg_tree_executor.hpp"
|
|
|
|
int main(const int argc, const char** argv) {
|
|
rclcpp::init(argc, argv);
|
|
|
|
std::cout << "Starting up Behavior Tree Executor" << std::endl;
|
|
|
|
rclcpp::NodeOptions options;
|
|
|
|
auto bt_exec_server = std::make_shared<mg::MgTreeExecutor>(options);
|
|
|
|
rclcpp::executors::MultiThreadedExecutor executor(
|
|
rclcpp::ExecutorOptions(), 0, false, std::chrono::milliseconds(250));
|
|
|
|
executor.add_node(bt_exec_server->node());
|
|
executor.spin();
|
|
executor.remove_node(bt_exec_server->node());
|
|
|
|
rclcpp::shutdown();
|
|
return 0;
|
|
} |