Choreonoid  1.5
PoseSeqInterpolator.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_POSE_SEQ_PLUGIN_POSE_SEQ_INTERPOLATOR_H
7 #define CNOID_POSE_SEQ_PLUGIN_POSE_SEQ_INTERPOLATOR_H
8 
9 #include "PoseSeq.h"
10 #include <cnoid/PoseProvider>
11 #include <cnoid/Signal>
12 #include <boost/shared_ptr.hpp>
13 #include "exportdecl.h"
14 
15 namespace cnoid {
16 
17 class Mapping;
18 class PSIImpl;
19 
21 {
22 public:
23 
25 
26  void setBody(Body* body);
27  Body* body() const;
28 
29  void setLinearInterpolationJoint(int jointId);
30 
31  void addFootLink(int linkIndex, const Vector3& soleCenter);
32 
33  void setLipSyncShapes(const Mapping& info);
34  const std::vector<int>& lipSyncLinkIndices();
35 
36  void setPoseSeq(PoseSeqPtr seq);
37 
38  void setTimeScaleRatio(double ratio);
39 
40  double beginningTime() const;
41  double endingTime() const;
42 
43  void enableStealthyStepMode(bool on);
44  void setStealthyStepParameters(
45  double heightRatioThresh,
46  double flatLiftingHeight, double flatLandingHeight,
47  double impactReductionHeight, double impactReductionTime);
48 
49  void enableAutoZmpAdjustmentMode(bool on);
50  void setZmpAdjustmentParameters(
51  double minTransitionTime, double centeringTimeThresh,
52  double timeMarginBeforeLifting, double maxDistanceFromCenter);
53 
54  void enableLipSyncMix(bool on);
55 
59  void setAutoUpdateMode(bool on);
60 
61  bool update();
62 
63  SignalProxy<void()> sigUpdated();
64 
65  bool interpolate(double time);
66  bool interpolate(double time, int waistLinkIndex, const Vector3& waistTranslation);
67 
68  virtual bool seek(double time);
69  virtual bool seek(double time, int waistLinkIndex, const Vector3& waistTranslation);
70 
74  int baseLinkIndex() const;
75  virtual bool getBaseLinkPosition(Position& out_T) const;
76 
77  boost::optional<double> jointPosition(int jointId) const;
78  boost::optional<Vector3> ZMP() const;
79 
80  virtual void getJointPositions(std::vector< boost::optional<double> >& out_q) const;
81 
82 private:
83 
84  PSIImpl* impl;
85 };
86 
87 typedef boost::shared_ptr<PoseSeqInterpolator> PoseSeqInterpolatorPtr;
88 }
89 
90 #endif
Definition: Body.h:28
Definition: ValueTree.h:224
Definition: PoseProvider.h:16
Eigen::Transform< double, 3, Eigen::AffineCompact > Position
Definition: EigenTypes.h:73
Definition: PoseSeqInterpolator.h:20
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
boost::shared_ptr< PoseSeqInterpolator > PoseSeqInterpolatorPtr
Definition: PoseSeqInterpolator.h:87
Eigen::Vector3d Vector3
Definition: EigenTypes.h:58
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
Definition: Signal.h:380