Common
common packages for kyubic
 
Loading...
Searching...
No Matches
wrench_action_server.hpp
Go to the documentation of this file.
1#ifndef _WRENCH_ACTION_SERVER_HPP
2#define _WRENCH_ACTION_SERVER_HPP
3
4#include <geometry_msgs/msg/wrench_stamped.hpp>
5#include <wrench_action_sample_msgs/action/wrench.hpp>
6
7#include "rclcpp_action/rclcpp_action.hpp"
8
15class WrenchActionServer : public rclcpp::Node
16{
17public:
18 using Wrench = wrench_action_sample_msgs::action::Wrench;
19 using GoalHandleApplyWrench = rclcpp_action::ServerGoalHandle<Wrench>;
20 using WrenchMsg = geometry_msgs::msg::WrenchStamped;
21
26 explicit WrenchActionServer(const rclcpp::NodeOptions & options = rclcpp::NodeOptions());
27
28private:
29 rclcpp_action::Server<Wrench>::SharedPtr action_server_;
30 rclcpp::Publisher<WrenchMsg>::SharedPtr publisher_;
31
38 rclcpp_action::GoalResponse handle_goal(
39 const rclcpp_action::GoalUUID & uuid, std::shared_ptr<const Wrench::Goal> goal);
40
46 rclcpp_action::CancelResponse handle_cancel(
47 const std::shared_ptr<GoalHandleApplyWrench> goal_handle);
48
54 void handle_accepted(const std::shared_ptr<GoalHandleApplyWrench> goal_handle);
55
61 void execute(const std::shared_ptr<GoalHandleApplyWrench> goal_handle);
62};
63
64#endif // WRENCH_ACTION_SERVER_HPP_
Action Server node that publishes WrenchStamped messages.
Definition: wrench_action_server.hpp:16
wrench_action_sample_msgs::action::Wrench Wrench
Definition: wrench_action_server.hpp:18
rclcpp_action::ServerGoalHandle< Wrench > GoalHandleApplyWrench
Definition: wrench_action_server.hpp:19
geometry_msgs::msg::WrenchStamped WrenchMsg
Definition: wrench_action_server.hpp:20