wrench_manager.hpp
Go to the documentation of this file.
1 #ifndef __WRENCH_MANAGER__
2 #define __WRENCH_MANAGER__
3 
6 #include <geometry_msgs/WrenchStamped.h>
8 #include <ros/ros.h>
10 #include <tf/transform_listener.h>
11 #include <Eigen/Dense>
14 
16 {
21 class WrenchManager : public ManagerBase
22 {
23  public:
26 
38  bool initializeWrenchComm(const std::string &end_effector,
39  const std::string &sensor_frame,
40  const std::string &gripping_point_frame,
41  const std::string &sensor_topic,
42  const std::string &calib_matrix_param);
43 
51  bool setGrippingPoint(const std::string &end_effector,
52  const std::string &gripping_point_frame);
53 
62  bool wrenchAtGrippingPoint(const std::string &end_effector,
63  Eigen::Matrix<double, 6, 1> &wrench) const;
64 
72  bool wrenchAtSensorPoint(const std::string &end_effector,
73  Eigen::Matrix<double, 6, 1> &wrench) const;
74 
82  bool wrenchAtSensorPointInGraspFrame(const std::string &end_effector,
83  Eigen::Matrix<double, 6, 1> &wrench) const;
84 
85  private:
87  std::map<std::string, std::string> sensor_frame_;
88  std::map<std::string, KDL::Frame> sensor_to_gripping_point_;
89  std::map<std::string, KDL::Wrench> measured_wrench_;
90  std::map<std::string, ros::Subscriber> ft_sub_;
91  std::map<std::string, ros::Publisher> processed_ft_pub_;
92  std::map<std::string, std::string> gripping_frame_;
93  std::map<std::string, Eigen::Matrix<double, 6, 6> > calibration_matrix_;
97 
103  void forceTorqueCB(const geometry_msgs::WrenchStamped::ConstPtr &msg);
104 };
105 
114 bool setWrenchManager(const ArmInfo &arm_info, WrenchManager &manager);
115 bool setWrenchManager(const ArmInfo &arm_info,
116  std::shared_ptr<WrenchManager> &manager);
117 } // namespace generic_control_toolbox
118 #endif
bool setGrippingPoint(const std::string &end_effector, const std::string &gripping_point_frame)
std::map< std::string, ros::Subscriber > ft_sub_
bool setWrenchManager(const ArmInfo &arm_info, WrenchManager &manager)
std::map< std::string, KDL::Frame > sensor_to_gripping_point_
bool wrenchAtGrippingPoint(const std::string &end_effector, Eigen::Matrix< double, 6, 1 > &wrench) const
std::map< std::string, std::string > gripping_frame_
bool wrenchAtSensorPointInGraspFrame(const std::string &end_effector, Eigen::Matrix< double, 6, 1 > &wrench) const
WrenchManager(ros::NodeHandle nh_=ros::NodeHandle("~"))
std::map< std::string, std::string > sensor_frame_
void forceTorqueCB(const geometry_msgs::WrenchStamped::ConstPtr &msg)
std::map< std::string, Eigen::Matrix< double, 6, 6 > > calibration_matrix_
std::map< std::string, KDL::Wrench > measured_wrench_
std::map< std::string, ros::Publisher > processed_ft_pub_
bool wrenchAtSensorPoint(const std::string &end_effector, Eigen::Matrix< double, 6, 1 > &wrench) const
bool initializeWrenchComm(const std::string &end_effector, const std::string &sensor_frame, const std::string &gripping_point_frame, const std::string &sensor_topic, const std::string &calib_matrix_param)


generic_control_toolbox
Author(s): diogo
autogenerated on Mon Feb 28 2022 22:24:37