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 StandingDemoClient : public ocra_recipes::ControllerClient 00010 { 00011 DEFINE_CLASS_POINTER_TYPEDEFS(StandingDemoClient) 00012 00013 public: 00014 StandingDemoClient (std::shared_ptr<ocra::Model> modelPtr, const int loopPeriod); 00015 virtual ~StandingDemoClient (); 00016 bool configure(yarp::os::ResourceFinder &rf); 00017 00018 protected: 00019 virtual bool initialize(); 00020 virtual void release(); 00021 virtual void loop(); 00022 virtual void printHelp(); 00023 00024 private: 00025 double maxVel; 00026 double maxAcc; 00027 bool useMinJerk; 00028 ocra_recipes::TrajectoryThread::Ptr comTrajThread; 00029 ocra_recipes::TrajectoryThread::Ptr rootTrajThread; 00030 // ocra_recipes::TaskConnection::Ptr comTask; 00031 // ocra_recipes::TaskConnection::Ptr rootTask; 00032 ocra_recipes::TaskConnection::Ptr leftLegContactTask; 00033 ocra_recipes::TaskConnection::Ptr rightLegContactTask; 00034 00035 double startTime; 00036 double contactReleaseDelay; 00037 bool contactsReleased; 00038 00039 void deactivateLegContacts(); 00040 00041 }; 00042 00043 00044 #endif // TEST_CLIENT_H