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 
00064     ~RealShadowhand();
00065 
00074     virtual short sendupdate( std::string joint_name, double target );
00075 
00076     virtual JointData getJointData( std::string joint_name );
00077     virtual JointsMap getAllJointsData();
00078 
00079     virtual short setContrl( std::string contrlr_name, JointControllerData ctrlr_data );
00080     virtual JointControllerData getContrl( std::string contrlr_name );
00081     virtual short setConfig( std::vector<std::string> myConfig );
00082     virtual void getConfig( std::string joint_name );
00083     virtual std::vector<DiagnosticData> getDiagnostics();
00084   protected:
00085     /***
00086      * Initializes the mapping between the joint_names and their data. This function fetches the joint_names from
00087      * the robot code.
00088      */
00089     void initializeMap();
00090 
00092      //    TESTS    //
00094 
00103     void pretest(diagnostic_updater::DiagnosticStatusWrapper& status);
00104 
00112     void posttest(diagnostic_updater::DiagnosticStatusWrapper& status);
00113 
00121     void test_messages(diagnostic_updater::DiagnosticStatusWrapper& status);
00122 
00134     std::pair<unsigned char, std::string> test_messages_routine(std::string joint_name, unsigned int repeat, ros::Rate rate);
00135 
00136   }; //end class
00137 }
00138 
00139 /* For the emacs weenies in the crowd.
00140 Local Variables:
00141    c-basic-offset: 2
00142 End:
00143 */
00144 
00145 #endif      /* !REAL_SHADOWHAND_H_ */


sr_hand
Author(s): Ugo Cupcic / ugo@shadowrobot.com, contact@shadowrobot.com
autogenerated on Mon Oct 6 2014 07:44:02