hand_commander.hpp
Go to the documentation of this file.
00001 
00030 #pragma once
00031 
00032 #include <ros/ros.h>
00033 #include <vector>
00034 #include <string>
00035 #include <map>
00036 
00037 #include <boost/smart_ptr.hpp>
00038 #include <boost/ptr_container/ptr_map.hpp>
00039 #include <sr_robot_msgs/joint.h>
00040 
00041 using namespace ros;
00042 
00043 
00044 namespace shadowhandRosLib
00045 {
00046   enum HandType
00047   {
00048     UNKNOWN,
00049     CAN,
00050     ETHERCAT
00051   };
00052 }
00053 
00054 namespace shadowrobot
00055 {
00056 
00061 class HandCommander
00062 {
00063 public:
00064     HandCommander();
00065 
00067     ~HandCommander();
00068 
00069     void sendCommands(std::vector<sr_robot_msgs::joint> joint_vector);
00070 
00071 private:
00073     NodeHandle node_;
00075     Publisher sr_hand_target_pub;
00077     boost::ptr_map<std::string,Publisher> sr_hand_target_pub_map;
00078 
00079     shadowhandRosLib::HandType hand_type;
00080     bool ethercat_controllers_found;
00081 
00086     void initializeEthercatHand();
00087 
00088     static const double TIMEOUT_TO_DETECT_CONTROLLER_MANAGER;
00089 }; // end class ShadowhandSubscriber
00090 
00091 } // end namespace


sr_hand
Author(s): Ugo Cupcic / ugo@shadowrobot.com, contact@shadowrobot.com
autogenerated on Fri Jan 3 2014 12:03:25