feet_force_torque_sensor_module.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 /*
18  * feet_force_torque_sensor_module.h
19  *
20  * Created on: 2016. 3. 22.
21  * Author: Jay Song
22  */
23 
24 #ifndef THORMANG3_FEET_FT_MODULE_FEET_FORCE_TORQUE_SENSOR_MODULE_H_
25 #define THORMANG3_FEET_FT_MODULE_FEET_FORCE_TORQUE_SENSOR_MODULE_H_
26 
27 #include <fstream>
28 #include <ros/ros.h>
29 #include <ros/callback_queue.h>
30 #include <std_msgs/String.h>
31 #include <boost/thread.hpp>
32 #include <eigen3/Eigen/Eigen>
33 #include <yaml-cpp/yaml.h>
34 
35 #include "robotis_controller_msgs/StatusMsg.h"
36 #include "thormang3_feet_ft_module_msgs/BothWrench.h"
37 
42 
43 namespace thormang3
44 {
45 
47 {
48 public:
51 
52 
57 
62 
63  void initialize(const int control_cycle_msec, robotis_framework::Robot *robot);
64  void process(std::map<std::string, robotis_framework::Dynamixel *> dxls, std::map<std::string, robotis_framework::Sensor *> sensors);
65 
66 private:
67  void queueThread();
68 
70  void saveFTCalibrationData(const std::string &path);
71 
72  void ftSensorCalibrationCommandCallback(const std_msgs::String::ConstPtr& msg);
73  void publishStatusMsg(unsigned int type, std::string msg);
74  void publishBothFTData(int type, Eigen::MatrixXd &ft_right, Eigen::MatrixXd &ft_left);
75 
76 
78  boost::thread queue_thread_;
79  boost::mutex publish_mutex_;
80 
81 
83 
84 
87 
90 
91  Eigen::MatrixXd r_foot_ft_air_, l_foot_ft_air_;
92  Eigen::MatrixXd r_foot_ft_gnd_, l_foot_ft_gnd_;
93 
96 
97 
98  double total_mass_;
100 
106 
107  const int FT_NONE;
108  const int FT_AIR;
109  const int FT_GND;
110  const int FT_CALC;
111 
112 
115 };
116 
117 
118 }
119 
120 
121 #endif /* THORMANG3_FEET_FT_MODULE_FEET_FORCE_TORQUE_SENSOR_MODULE_H_ */
void initialize(const int control_cycle_msec, robotis_framework::Robot *robot)
void process(std::map< std::string, robotis_framework::Dynamixel * > dxls, std::map< std::string, robotis_framework::Sensor * > sensors)
void publishBothFTData(int type, Eigen::MatrixXd &ft_right, Eigen::MatrixXd &ft_left)
void ftSensorCalibrationCommandCallback(const std_msgs::String::ConstPtr &msg)
void publishStatusMsg(unsigned int type, std::string msg)
void saveFTCalibrationData(const std::string &path)


thormang3_feet_ft_module
Author(s): Zerom , SCH , Kayman , Jay Song
autogenerated on Mon Jun 10 2019 15:37:52