Choreonoid  1.8
PoseProvider.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BODY_POSE_PROVIDER_H
7 #define CNOID_BODY_POSE_PROVIDER_H
8 
9 #include "Body.h"
10 #include <cnoid/EigenTypes>
11 #include <cnoid/stdx/optional>
12 #include <vector>
13 
14 namespace cnoid {
15 
17 {
18 public:
19  virtual ~PoseProvider() { };
20  virtual Body* body() const = 0;
21  virtual double beginningTime() const = 0;
22  virtual double endingTime() const = 0;
23  virtual bool seek(double time) = 0;
24  virtual bool seek(double time, int waistLinkIndex, const Vector3& waistTranslation) = 0;
25  virtual int baseLinkIndex() const = 0;
26  virtual bool getBaseLinkPosition(Isometry3& out_T) const = 0;
27  virtual void getJointPositions(std::vector<stdx::optional<double>>& out_q) const = 0;
28  virtual stdx::optional<Vector3> ZMP() const = 0;
29 
30 #ifdef CNOID_BACKWARD_COMPATIBILITY
31  bool getBaseLinkPosition(Vector3& out_p, Matrix3& out_R) const {
32  Isometry3 T;
33  if(getBaseLinkPosition(T)){
34  out_p = T.translation();
35  out_R = T.linear();
36  return true;
37  }
38  return false;
39  }
40 #endif
41 };
42 }
43 
44 #endif
cnoid::Vector3
Eigen::Vector3d Vector3
Definition: EigenTypes.h:57
cnoid::PoseProvider::seek
virtual bool seek(double time)=0
cnoid::Isometry3
Eigen::Isometry3d Isometry3
Definition: EigenTypes.h:73
cnoid::Matrix3
Eigen::Matrix3d Matrix3
Definition: EigenTypes.h:56
cnoid::PoseProvider
Definition: PoseProvider.h:16
cnoid::PoseProvider::beginningTime
virtual double beginningTime() const =0
cnoid::PoseProvider::ZMP
virtual stdx::optional< Vector3 > ZMP() const =0
cnoid::PoseProvider::getJointPositions
virtual void getJointPositions(std::vector< stdx::optional< double >> &out_q) const =0
cnoid::PoseProvider::body
virtual Body * body() const =0
cnoid::PoseProvider::getBaseLinkPosition
virtual bool getBaseLinkPosition(Isometry3 &out_T) const =0
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::PoseProvider::endingTime
virtual double endingTime() const =0
cnoid::PoseProvider::baseLinkIndex
virtual int baseLinkIndex() const =0
Body.h
cnoid::Body
Definition: Body.h:28
cnoid::PoseProvider::~PoseProvider
virtual ~PoseProvider()
Definition: PoseProvider.h:19