robotiq_2f_gripper_action_server.h
Go to the documentation of this file.
1 
6 #ifndef ROBOTIQ_2F_GRIPPER_ACTION_SERVER_H
7 #define ROBOTIQ_2F_GRIPPER_ACTION_SERVER_H
8 
9 // STL
10 #include <string>
11 // ROS standard
12 #include <ros/ros.h>
14 #include <control_msgs/GripperCommandAction.h>
15 // Repo specific includes
16 #include <robotiq_2f_gripper_control/Robotiq2FGripper_robot_input.h>
17 #include <robotiq_2f_gripper_control/Robotiq2FGripper_robot_output.h>
18 
19 
21 {
22 
23 typedef robotiq_2f_gripper_control::Robotiq2FGripper_robot_input GripperInput;
24 typedef robotiq_2f_gripper_control::Robotiq2FGripper_robot_output GripperOutput;
25 
29 
39 {
40  double min_gap_; // meters
41  double max_gap_;
42  double min_effort_; // N / (Nm)
43  double max_effort_;
44 };
45 
53 {
54 public:
55  Robotiq2FGripperActionServer(const std::string& name, const Robotiq2FGripperParams& params);
56 
57  // These functions are meant to be called by simple action server
58  void goalCB();
59  void preemptCB();
60  void analysisCB(const GripperInput::ConstPtr& msg);
61 
62 private:
63  void issueActivation();
64 
67 
68  ros::Subscriber state_sub_; // Subs to grippers "input" topic
69  ros::Publisher goal_pub_; // Pubs to grippers "output" topic
70 
71  GripperOutput goal_reg_state_; // Goal information in gripper-register form
72  GripperInput current_reg_state_; // State info in gripper-register form
73 
74  /* Used to translate GripperCommands in engineering units
75  * to/from register states understood by gripper itself. Different
76  * for different models/generations of Robotiq grippers */
78 
79  std::string action_name_;
80 };
81 
82 }
83 #endif
control_msgs::GripperCommandResult GripperCommandResult
robotiq_2f_gripper_control::Robotiq2FGripper_robot_output GripperOutput
robotiq_2f_gripper_control::Robotiq2FGripper_robot_input GripperInput
control_msgs::GripperCommandFeedback GripperCommandFeedback
actionlib::SimpleActionServer< control_msgs::GripperCommandAction > as_
control_msgs::GripperCommandGoal GripperCommandGoal
The Robotiq2FGripperActionServer class. Takes as arguments the name of the gripper it is to command...
Structure containing the parameters necessary to translate GripperCommand actions to register-based c...


robotiq_2f_gripper_action_server
Author(s): Jonathan Meyer
autogenerated on Tue Jun 1 2021 02:29:56