00001 #ifndef SITTINGDEMOCLIENT_H 00002 #define SITTINGDEMOCLIENT_H 00003 00004 #include <ocra-icub/IcubClient.h> 00005 #include <ocra-recipes/TrajectoryThread.h> 00006 #include <ocra-recipes/ControllerClient.h> 00007 00008 00009 class SittingDemoClient : public ocra_recipes::ControllerClient 00010 { 00011 DEFINE_CLASS_POINTER_TYPEDEFS(SittingDemoClient) 00012 00013 public: 00014 SittingDemoClient (std::shared_ptr<ocra::Model> modelPtr, const int loopPeriod); 00015 virtual ~SittingDemoClient (); 00016 virtual bool configure(yarp::os::ResourceFinder &rf); 00017 00018 00019 protected: 00020 virtual bool initialize(); 00021 virtual void release(); 00022 virtual void loop(); 00023 00024 private: 00025 00026 void moveCom(); 00027 std::string taskName; 00028 ocra_recipes::TaskConnection::Ptr comTask; 00029 ocra_recipes::TrajectoryThread::Ptr comTrajThread; 00030 double xDisp, yDisp, zDisp; 00031 Eigen::Vector3d currentDesiredPosition; 00032 Eigen::MatrixXd Kp, Kd; 00033 }; 00034 00035 00036 #endif // TEST_CLIENT_H