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