ati_force_torque_sensor_twe.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2018 ROBOTIS CO., LTD.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
17 #ifndef ATI_FT_SENSOR_ATI_FORCE_TORQUE_SENSOR_TWE_H_
18 #define ATI_FT_SENSOR_ATI_FORCE_TORQUE_SENSOR_TWE_H_
19 
20 #include <ros/ros.h>
21 #include <ros/package.h>
22 #include <geometry_msgs/WrenchStamped.h>
23 #include <boost/thread.hpp>
24 #include <eigen3/Eigen/Eigen>
25 #include <yaml-cpp/yaml.h>
26 
28 
29 namespace thormang3
30 {
31 
33 {
34 public:
37 
38  bool initialize(const std::string& ft_data_path, const std::string& ft_data_key,
39  const std::string& ft_frame_id,
40  const std::string& ft_raw_publish_name, const std::string& ft_scaled_publish_name);
41 
42  void setScaleFactror(double ft_scale_factor);
43  void setNullForceTorque(Eigen::MatrixXd _ft_null);
44  void setScaleParam(double ft_scale_factor, Eigen::MatrixXd ft_null);
45 
46 
47  void setCurrentVoltageOutput(double voltage0, double voltage1, double voltage2,
48  double voltage3, double voltage4, double voltage5);
49  void setCurrentVoltageOutput(Eigen::MatrixXd voltage);
50 
51  Eigen::MatrixXd getCurrentForceTorqueRaw();
52  Eigen::MatrixXd getCurrentForceTorqueScaled();
53 
54  void getCurrentForceTorqueRaw(double *force_x_N, double *force_y_N, double *force_z_N,
55  double *torque_x_Nm, double *torque_y_Nm, double *torque_z_Nm);
56  void getCurrentForceTorqueScaled(double *force_x_N, double *force_y_N, double *force_z_N,
57  double *torque_x_Nm, double *torque_y_Nm, double *torque_z_Nm);
58 
59  void setCurrentVoltageOutputPublish(double voltage0, double voltage1, double voltage2,
60  double voltage3, double voltage4, double voltage5);
61  void setCurrentVoltageOutputPublish(Eigen::MatrixXd voltage);
62 
63 private:
64  bool parseFTData(const std::string& ft_data_path, const std::string& ft_data_key);
65 
66  Eigen::MatrixXd ft_coeff_mat_;
67  Eigen::MatrixXd ft_unload_volatge_;
68  Eigen::MatrixXd ft_current_volatge_;
69  Eigen::MatrixXd ft_null_;
70  Eigen::MatrixXd ft_raw_;
71  Eigen::MatrixXd ft_scaled_;
72 
73  boost::mutex ft_scale_param_mutex_;
74 
75 
77 
78  std::string ft_frame_id_;
79  std::string ft_raw_publish_name_;
81 
84 
85 
88 
89  geometry_msgs::WrenchStamped ft_raw_msg_;
90  geometry_msgs::WrenchStamped ft_scaled_msg_;
91 };
92 
93 }
94 
95 
96 #endif /* ATI_FT_SENSOR_ATI_FORCE_TORQUE_SENSOR_TWE_H_ */
void setCurrentVoltageOutput(double voltage0, double voltage1, double voltage2, double voltage3, double voltage4, double voltage5)
void setScaleParam(double ft_scale_factor, Eigen::MatrixXd ft_null)
void setCurrentVoltageOutputPublish(double voltage0, double voltage1, double voltage2, double voltage3, double voltage4, double voltage5)
bool parseFTData(const std::string &ft_data_path, const std::string &ft_data_key)
bool initialize(const std::string &ft_data_path, const std::string &ft_data_key, const std::string &ft_frame_id, const std::string &ft_raw_publish_name, const std::string &ft_scaled_publish_name)
void setNullForceTorque(Eigen::MatrixXd _ft_null)
geometry_msgs::WrenchStamped ft_scaled_msg_


ati_ft_sensor
Author(s): Kayman , Jay Song
autogenerated on Mon Jun 10 2019 15:37:37