real_shadowhand.h
Go to the documentation of this file.
1 
28 #ifndef SR_HAND_HAND_REAL_SHADOWHAND_H
29 #define SR_HAND_HAND_REAL_SHADOWHAND_H
30 
32 #include <utility>
33 #include <string>
34 #include <vector>
35 
36 namespace sr_self_tests
37 {
39  static const unsigned int nb_targets_to_send = 100;
40 
42  static const unsigned int msgs_frequency_size = 5;
44  static const int msgs_frequency[msgs_frequency_size] = {1, 5, 10, 20, 100};
45 
47  static const unsigned int joints_to_test_size = 1;
48  // t he name of the joint on which we want to run the test.
49  static const std::string joints_to_test[joints_to_test_size] = {"FFJ3"};
50 } // namespace sr_self_tests
51 
52 namespace shadowrobot
53 {
58  public SRArticulatedRobot
59 {
60 public:
66 
67  virtual ~RealShadowhand();
68 
77  virtual int16_t sendupdate(std::string joint_name, double target);
78 
79  virtual JointData getJointData(std::string joint_name);
80 
81  virtual JointsMap getAllJointsData();
82 
83  virtual int16_t setContrl(std::string contrlr_name, JointControllerData ctrlr_data);
84 
85  virtual JointControllerData getContrl(std::string contrlr_name);
86 
87  virtual int16_t setConfig(std::vector <std::string> myConfig);
88 
89  virtual void getConfig(std::string joint_name);
90 
91  virtual std::vector <DiagnosticData> getDiagnostics();
92 
93 protected:
94  /***
95  * Initializes the mapping between the joint_names and their data. This function fetches the joint_names from
96  * the robot code.
97  */
98  void initializeMap();
99 
101  // TESTS //
103 
112  void pretest(diagnostic_updater::DiagnosticStatusWrapper &status);
113 
121  void posttest(diagnostic_updater::DiagnosticStatusWrapper &status);
122 
130  void test_messages(diagnostic_updater::DiagnosticStatusWrapper &status);
131 
143  std::pair<unsigned char, std::string> test_messages_routine(std::string joint_name, unsigned int repeat,
144  ros::Rate rate);
145 }; // end class
146 } // namespace shadowrobot
147 
148 /* For the emacs weenies in the crowd.
149 Local Variables:
150  c-basic-offset: 2
151 End:
152 */
153 
154 #endif // SR_HAND_HAND_REAL_SHADOWHAND_H
static const std::string joints_to_test[joints_to_test_size]
static const unsigned int nb_targets_to_send
The number of targets to send during the test.
std::map< std::string, JointData > JointsMap
static const unsigned int msgs_frequency_size
the size of the msgs_frequency array
static const int msgs_frequency[msgs_frequency_size]
the rate at which we&#39;ll publish the data
This is a parent class for the different types of Shadowhand we can have. It makes it possible to swa...
static const unsigned int joints_to_test_size
the size of the joints_to_test array
This is a parent class for the different types of Shadowhand we can have. It makes it possible to swa...


sr_hand
Author(s): Ugo Cupcic
autogenerated on Tue Oct 13 2020 03:55:53