36 lines
No EOL
907 B
C++
36 lines
No EOL
907 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include <behavior_tree/BtService.hpp>
|
|
#include <scene_monitor_interfaces/srv/print_part.hpp>
|
|
|
|
#include <behaviortree_cpp_v3/bt_factory.h>
|
|
#include <geometry_msgs/msg/pose.hpp>
|
|
#include <rclcpp/rclcpp.hpp>
|
|
|
|
|
|
class Print : public BtService<scene_monitor_interfaces::srv::PrintPart>
|
|
{
|
|
public:
|
|
Print(const std::string &xml_tag_name,
|
|
const BT::NodeConfiguration &conf);
|
|
|
|
scene_monitor_interfaces::srv::PrintPart::Request::SharedPtr populate_request() override;
|
|
|
|
BT::NodeStatus handle_response(scene_monitor_interfaces::srv::PrintPart::Response::SharedPtr response) override;
|
|
|
|
static BT::PortsList providedPorts()
|
|
{
|
|
return providedBasicPorts({
|
|
BT::InputPort<std::string>("frame"),
|
|
BT::InputPort<std::string>("printer")
|
|
});
|
|
}
|
|
|
|
private:
|
|
|
|
std::string printer_;
|
|
std::string frame_;
|
|
}; |