diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-09-25 01:22:24 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-09-25 01:22:24 +0400 |
commit | 1483fafd1372a3d3e025d08634e798adb7da512f (patch) | |
tree | 9191765749e29866339f4c31d892603f5f8b334d /intern/itasc/Object.hpp | |
parent | c995c605f640d8d688e6e58e0fe247ca83f91696 (diff) | |
parent | 222fe6b1a5d49f67177cbb762f55a0e482145f5d (diff) |
Merge of itasc branch. Project files, scons and cmake should be working. Makefile updated but not tested. Comes with Eigen2 2.0.6 C++ matrix library.
Diffstat (limited to 'intern/itasc/Object.hpp')
-rw-r--r-- | intern/itasc/Object.hpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/intern/itasc/Object.hpp b/intern/itasc/Object.hpp new file mode 100644 index 00000000000..5c312cab768 --- /dev/null +++ b/intern/itasc/Object.hpp @@ -0,0 +1,48 @@ +/* $Id: Object.hpp 19907 2009-04-23 13:41:59Z ben2610 $ + * Object.hpp + * + * Created on: Jan 5, 2009 + * Author: rubensmits + */ + +#ifndef OBJECT_HPP_ +#define OBJECT_HPP_ + +#include "Cache.hpp" +#include "kdl/frames.hpp" +#include <string> + +namespace iTaSC{ + +class WorldObject; + +class Object { +public: + enum ObjectType {Controlled, UnControlled}; + static WorldObject world; + +private: + ObjectType m_type; +protected: + Cache *m_cache; + KDL::Frame m_internalPose; + bool m_updated; + virtual void updateJacobian()=0; +public: + Object(ObjectType _type):m_type(_type), m_cache(NULL), m_internalPose(F_identity), m_updated(false) {}; + virtual ~Object(){}; + + virtual int addEndEffector(const std::string& name){return 0;}; + virtual void finalize(){}; + virtual const KDL::Frame& getPose(const unsigned int end_effector=0){return m_internalPose;}; + virtual const ObjectType getType(){return m_type;}; + virtual const unsigned int getNrOfCoordinates(){return 0;}; + virtual void updateKinematics(const Timestamp& timestamp)=0; + virtual void pushCache(const Timestamp& timestamp)=0; + virtual void initCache(Cache *_cache) = 0; + bool updated() {return m_updated;}; + void updated(bool val) {m_updated=val;}; +}; + +} +#endif /* OBJECT_HPP_ */ |