real_shadowhand.h
Go to the documentation of this file.
00001 
00028 #ifndef         REAL_SHADOWHAND_H_
00029 # define        REAL_SHADOWHAND_H_
00030 
00031 #include "sr_hand/hand/sr_articulated_robot.h"
00032 
00033 namespace sr_self_tests
00034 {
00036   static const unsigned int nb_targets_to_send = 100;
00037 
00039   static const unsigned int msgs_frequency_size = 5;
00040   //the rate at which we'll publish the data
00041   static const int msgs_frequency[msgs_frequency_size] = {1, 5, 10, 20, 100};
00042 
00044   static const unsigned int joints_to_test_size = 1;
00046   static const std::string joints_to_test[joints_to_test_size] = {"FFJ3"};
00047 }
00048 
00049 namespace shadowrobot
00050 {
00054   class RealShadowhand : public SRArticulatedRobot
00055   {
00056   public:
00061     RealShadowhand();
00062 
00063     virtual ~RealShadowhand();
00064 
00073     virtual short sendupdate( std::string joint_name, double target );
00074 
00075     virtual JointData getJointData( std::string joint_name );
00076     virtual JointsMap getAllJointsData();
00077 
00078     virtual short setContrl( std::string contrlr_name, JointControllerData ctrlr_data );
00079     virtual JointControllerData getContrl( std::string contrlr_name );
00080     virtual short setConfig( std::vector<std::string> myConfig );
00081     virtual void getConfig( std::string joint_name );
00082     virtual std::vector<DiagnosticData> getDiagnostics();
00083   protected:
00084     /***
00085      * Initializes the mapping between the joint_names and their data. This function fetches the joint_names from
00086      * the robot code.
00087      */
00088     void initializeMap();
00089 
00091      //    TESTS    //
00093 
00102     void pretest(diagnostic_updater::DiagnosticStatusWrapper& status);
00103 
00111     void posttest(diagnostic_updater::DiagnosticStatusWrapper& status);
00112 
00120     void test_messages(diagnostic_updater::DiagnosticStatusWrapper& status);
00121 
00133     std::pair<unsigned char, std::string> test_messages_routine(std::string joint_name, unsigned int repeat, ros::Rate rate);
00134 
00135   }; //end class
00136 }
00137 
00138 /* For the emacs weenies in the crowd.
00139 Local Variables:
00140    c-basic-offset: 2
00141 End:
00142 */
00143 
00144 #endif      /* !REAL_SHADOWHAND_H_ */


sr_hand
Author(s): Ugo Cupcic
autogenerated on Fri Aug 21 2015 12:24:55