sr_hand_finder.hpp
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Shadow Robot Company Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 
17 /*
18 * File: sf_hand_finder.hpp
19 * Author: Vahid Aminzadeh <vahid@shadowrobot.com>
20 * @brief see README.md
21 */
22 
23 #pragma once
24 
25 #include "ros/ros.h"
26 #include <map>
27 #include <string>
28 #include <vector>
29 
30 namespace shadow_robot
31 {
32 
33 struct HandConfig
34 {
35  std::map<std::string, std::string> mapping_;
36  std::map<std::string, std::string> joint_prefix_;
37 };
38 
40 {
41  std::map<std::string, std::string> friction_compensation_;
42  std::map<std::string, std::vector<std::string> > host_control_;
43  std::map<std::string, std::string> motor_control_;
44 };
45 
47 {
48 public:
49  static const std::vector<std::string> get_default_joints();
50 
51  std::map<std::string, std::vector<std::string> > get_joints();
52 
53  HandConfig get_hand_parameters();
54 
55  std::map<std::string, std::string> get_calibration_path();
56 
57  HandControllerTuning get_hand_controller_tuning();
58 
59  SrHandFinder();
60 
61  virtual ~SrHandFinder()
62  {
63  }
64 
65 private:
66  static const std::vector<std::string> joint_names_;
70  std::map<std::string, std::vector<std::string> > joints_;
71  std::map<std::string, std::string> calibration_path_;
72 
73  void generate_joints_with_prefix();
74 
75  void generate_calibration_path();
76 
77  void generate_hand_controller_tuning_path();
78 };
79 
80 } /* namespace shadow_robot */
std::map< std::string, std::string > mapping_
std::map< std::string, std::vector< std::string > > host_control_
HandControllerTuning hand_controller_tuning_
static const std::vector< std::string > joint_names_
std::map< std::string, std::string > motor_control_
std::map< std::string, std::string > friction_compensation_
std::map< std::string, std::string > calibration_path_
std::map< std::string, std::string > joint_prefix_
std::map< std::string, std::vector< std::string > > joints_


sr_utilities
Author(s): Ugo Cupcic
autogenerated on Mon Feb 28 2022 23:52:19