virtual_arm.h
Go to the documentation of this file.
00001 
00026 #ifndef VIRTUAL_ARM_H_
00027 #define VIRTUAL_ARM_H_
00028 
00029 #include "sr_hand/hand/sr_articulated_robot.h"
00030 
00031 namespace shadowrobot
00032 {
00033 
00034 class VirtualArm : public SRArticulatedRobot
00035 {
00036 public:
00040     VirtualArm();
00042     ~VirtualArm();
00043 
00044     //virtual classes defined in SRArticulatedRobot
00055     virtual short sendupdate( std::string joint_name, double target );
00056 
00065     virtual JointData getJointData( std::string joint_name );
00066     virtual JointsMap getAllJointsData();
00067 
00068     virtual short setContrl( std::string contrlr_name, JointControllerData ctrlr_data );
00069     virtual JointControllerData getContrl( std::string ctrlr_name );
00070 
00071     virtual short setConfig( std::vector<std::string> myConfig );
00072     virtual void getConfig( std::string joint_name );
00073 
00079     virtual std::vector<DiagnosticData> getDiagnostics();
00080 protected:
00081 #ifdef GAZEBO
00082 
00086     ros::NodeHandle node, n_tilde;
00087 
00088     void gazeboCallback(const sensor_msgs::JointStateConstPtr& msg);
00089 #endif
00090 
00093     void initializeMap();
00094 
00100     inline double toRad( double deg )
00101     {
00102         return deg * 3.14159265 / 180.0;
00103     }
00104 
00110     inline double toDegrees( double rad )
00111     {
00112         return rad * 180.0 / 3.14159265;
00113     }
00114 };
00115 
00116 }//end namespace
00117 
00118 #endif /* VIRTUAL_ARM_H_ */


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