00001
00002
00003 #ifndef _REC_ROBOTINO_COM_MANIPULATOR_H_
00004 #define _REC_ROBOTINO_COM_MANIPULATOR_H_
00005
00006 #include "rec/robotino/com/Actor.h"
00007 #include "rec/robotino/com/ManipulatorReadings.h"
00008 #include "rec/robotino/com/ManipulatorLimits.h"
00009
00010 #include <vector>
00011 #include <string>
00012
00013 namespace rec
00014 {
00015 namespace robotino
00016 {
00017 namespace com
00018 {
00019 class ManipulatorImpl;
00020
00024 class
00025 #ifdef WIN32
00026 # ifdef rec_robotino_com_EXPORTS
00027 __declspec(dllexport)
00028 # endif
00029 # ifdef rec_robotino_com2_EXPORTS
00030 __declspec(dllexport)
00031 # endif
00032 # ifdef rec_robotino_com3_EXPORTS
00033 __declspec(dllexport)
00034 # endif
00035 #else
00036 # ifndef SWIG
00037 __attribute__ ((visibility ("default")))
00038 # endif
00039 #endif
00040 Manipulator : public Actor
00041 {
00042 public:
00043 Manipulator();
00044
00045 virtual ~Manipulator();
00046
00053 void setComId( const ComId& id );
00054
00060 void connectToServer();
00061
00067 void disconnectFromServer();
00068
00074 void setAddress( const std::string& address );
00075
00076 std::string address() const;
00077
00078 bool isConnected() const;
00079
00086 void setAxis( unsigned int axis, float angle, float speed );
00087
00093 void setAxes( const std::vector<float>& angles, const std::vector<float>& speeds );
00094
00103 void setPowerEnabled( unsigned int channel, bool enable );
00104
00108 void toggleTorque();
00109
00110 virtual void servoInfoCallback( const int numServos );
00111
00116 virtual void readingsCallback( const ManipulatorReadings& readings );
00117
00122 virtual void limitsCallback( const ManipulatorLimits& limits );
00123
00128 virtual void error( const std::string& message );
00129
00133 virtual void connected();
00134
00138 virtual void disconnected();
00139
00140 private:
00141 ManipulatorImpl* _impl;
00142 };
00143 }
00144 }
00145 }
00146 #endif