pg.h
Go to the documentation of this file.
1 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2  * Copyright Projet JRL-Japan, 2008
3  *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4  *
5  * File: sotDynamic.h
6  * Project: SOT
7  * Author: Olivier Stasse
8  *
9  * Version control
10  * ===============
11  *
12  * $Id$
13  *
14  * Description
15  * ============
16  *
17  *
18  * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
19 
20 #ifndef __SOT_PATTERN_GENERATOR_H__
21 #define __SOT_PATTERN_GENERATOR_H__
22 
23 /* --------------------------------------------------------------------- */
24 /* --- INCLUDE --------------------------------------------------------- */
25 /* --------------------------------------------------------------------- */
26 
27 /* STD */
28 #include <pinocchio/fwd.hpp>
29 #include <string>
30 
31 /* SOT */
32 
33 #include <dynamic-graph/entity.h>
34 #include <dynamic-graph/pool.h>
35 #include <dynamic-graph/signal-ptr.h>
36 #include <dynamic-graph/signal-time-dependent.h>
38 
39 #include <pinocchio/fwd.hpp>
40 #include <sot/core/flags.hh>
41 #include <sot/core/matrix-geometry.hh>
42 
43 /* Pattern Generator */
44 #include <jrl/walkgen/patterngeneratorinterface.hh>
45 #include <jrl/walkgen/pinocchiorobot.hh>
46 namespace pg = PatternGeneratorJRL;
47 
48 /* --------------------------------------------------------------------- */
49 /* --- API ------------------------------------------------------------- */
50 /* --------------------------------------------------------------------- */
51 
52 #if defined(WIN32)
53 #if defined(pg_EXPORTS)
54 #define PatternGenerator_EXPORT __declspec(dllexport)
55 #else
56 #define PatternGenerator_EXPORT __declspec(dllimport)
57 #endif
58 #else
59 #define PatternGenerator_EXPORT
60 #endif
61 
62 namespace dynamicgraph {
63 namespace sot {
64 
70 };
71 
72 /* --------------------------------------------------------------------- */
73 /* --- CLASS ----------------------------------------------------------- */
74 /* --------------------------------------------------------------------- */
75 
85  public:
86  // overload the new[] eigen operator
87  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
88 
95  static const int WORLD_FRAME = 0;
96 
99  static const int EGOCENTERED_FRAME = 1;
100 
103  static const int LEFT_FOOT_CENTERED_FRAME = 2;
104 
107  static const int WAIST_CENTERED_FRAME = 3;
108 
112  protected:
113  public:
114  DYNAMIC_GRAPH_ENTITY_DECL();
115 
116  protected:
118  pinocchio::Model m_robotModel;
120  pg::PinocchioRobot *m_PR;
122  pinocchio::Data *m_robotData;
124  pg::PatternGeneratorInterface *m_PGI;
125 
131 
134  std::string m_urdfFile;
135 
138  std::string m_srdfFile;
139 
142  std::string m_xmlRankFile;
143 
144  std::vector<unsigned> m_wrml2urdfIndex;
145 
147  double m_soleLength;
148 
150  double m_soleWidth;
151 
152  /* \brief Special joints map for the parser */
153  std::map<std::string, std::string> specialJoints_;
154 
159  bool m_init;
160 
165 
168 
171 
174 
176  double m_TimeStep;
177 
182 
185 
187  unsigned int m_count;
188 
189  /* \name Body names of the end effectors
190  @{ */
191  /* \brief Left ankle */
193 
194  /* \brief Right ankle */
196 
197  /* \brief Left wrist */
199 
200  /* \brief Right wrist */
202 
203  /* @} */
204  public: /* --- CONSTRUCTION --- */
206  PatternGenerator(const std::string &name = "PatternGenerator");
208  virtual ~PatternGenerator(void);
209 
210  public: /* --- MODEL CREATION --- */
218  bool buildPGI(void);
219 
221  bool addComplementaryFrames();
222 
224  bool buildReducedModel(void);
225 
227  void readFootParameters(std::string &rootFootPath, pg::PRFoot &aFoot);
228 
230  bool InitState(void);
231 
234  void setPreviewControlParametersFile(const std::string &filename);
235 
237  void setURDFFile(const std::string &filename);
238 
243  void setSRDFFile(const std::string &filename);
244 
246  void setXmlRankFile(const std::string &filename);
247 
250  void setParamPreviewFile(const std::string &filename);
251 
253  void setSoleParameters(const double &inSoleLength, const double &inSoleWidth);
254 
256  void addJointMapping(const std::string &link, const std::string &repName);
257 
260  pg::PatternGeneratorInterface *GetPatternGeneratorInterface() {
261  return m_PGI;
262  };
263 
266  public: /* --- SIGNALS --- */
267  typedef int Dummy;
268 
274  SignalTimeDependent<Dummy, int> firstSINTERN;
275 
277  SignalTimeDependent<Dummy, int> OneStepOfControlS;
278 
281  protected:
286  dynamicgraph::Vector &getZMPRef(dynamicgraph::Vector &res, int time);
287 
289  dynamicgraph::Vector &getCoMRef(dynamicgraph::Vector &res, int time);
290 
292  dynamicgraph::Vector &getdCoMRef(dynamicgraph::Vector &res, int time);
293 
295  dynamicgraph::Vector &getddCoMRef(dynamicgraph::Vector &res, int time);
296 
298  dynamicgraph::Vector &getExternalForces(dynamicgraph::Vector &forces,
299  int time);
300 
302  MatrixHomogeneous &getLeftFootRef(MatrixHomogeneous &res, int time);
303 
305  MatrixHomogeneous &getRightFootRef(MatrixHomogeneous &res, int time);
306 
308  MatrixHomogeneous &getdotLeftFootRef(MatrixHomogeneous &res, int time);
309 
311  MatrixHomogeneous &getdotRightFootRef(MatrixHomogeneous &res, int time);
312 
314  MatrixHomogeneous &getFlyingFootRef(MatrixHomogeneous &res, int time);
315 
317  dynamicgraph::Vector &getjointWalkingErrorPosition(dynamicgraph::Vector &res,
318  int time);
319 
321  dynamicgraph::Vector &getdComAttitude(dynamicgraph::Vector &res, int time);
322 
325  dynamicgraph::Vector &getddComAttitude(dynamicgraph::Vector &res, int time);
326 
328  dynamicgraph::Vector &getComAttitude(dynamicgraph::Vector &res, int time);
329 
331  VectorRollPitchYaw &getWaistAttitude(VectorRollPitchYaw &res, int time);
332 
334  VectorRollPitchYaw &getWaistAttitudeAbsolute(VectorRollPitchYaw &res,
335  int time);
336 
339  MatrixHomogeneous &getWaistAttitudeMatrixAbsolute(MatrixHomogeneous &res,
340  int time);
341 
343  unsigned &getDataInProcess(unsigned &res, int time);
344 
346  dynamicgraph::Vector &getWaistPosition(dynamicgraph::Vector &res, int time);
347 
349  dynamicgraph::Vector &getWaistPositionAbsolute(dynamicgraph::Vector &res,
350  int time);
351 
355  int &getSupportFoot(int &res, int time);
356 
358  int &InitOneStepOfControl(int &dummy, int time);
360  int &OneStepOfControl(int &dummy, int time);
361 
368  MatrixHomogeneous m_k_Waist_kp1;
369 
371  MatrixHomogeneous m_LeftFootPosition, m_RightFootPosition;
372  PatternGeneratorJRL::FootAbsolutePosition m_PrevSamplingRightFootAbsPos,
374  PatternGeneratorJRL::FootAbsolutePosition m_NextSamplingRightFootAbsPos,
376  PatternGeneratorJRL::FootAbsolutePosition m_InitRightFootAbsPos,
378 
380  MatrixHomogeneous m_dotLeftFootPosition, m_dotRightFootPosition;
381 
384  MatrixHomogeneous m_InitLeftFootPosition, m_InitRightFootPosition;
385 
388 
390  MatrixHomogeneous m_FlyingFootPosition;
391 
393  dynamicgraph::Vector m_ZMPRefPos;
394 
398  dynamicgraph::Vector m_ComAttitude;
399 
402  dynamicgraph::Vector m_dComAttitude;
403 
406  dynamicgraph::Vector m_ddComAttitude;
407 
409  dynamicgraph::Vector m_COMRefPos;
410  dynamicgraph::Vector m_PrevSamplingCOMRefPos;
411  dynamicgraph::Vector m_NextSamplingCOMRefPos;
412 
414  dynamicgraph::Vector m_dCOMRefPos;
415  dynamicgraph::Vector m_PrevSamplingdCOMRefPos;
416  dynamicgraph::Vector m_NextSamplingdCOMRefPos;
417 
419  dynamicgraph::Vector m_ddCOMRefPos;
420  dynamicgraph::Vector m_PrevSamplingddCOMRefPos;
421  dynamicgraph::Vector m_NextSamplingddCOMRefPos;
422 
424  dynamicgraph::Vector m_InitZMPRefPos;
425 
428  dynamicgraph::Vector m_InitWaistRefPos, m_InitWaistRefAtt;
429 
431  dynamicgraph::Vector m_InitCOMRefPos;
432 
434  dynamicgraph::Vector m_WaistPosition;
435 
437  dynamicgraph::Vector m_WaistPositionAbsolute;
438 
440  dynamicgraph::Vector m_WaistAttitude;
441 
443  dynamicgraph::Vector m_WaistAttitudeAbsolute;
444  dynamicgraph::Vector m_PrevSamplingWaistAttAbs;
445  dynamicgraph::Vector m_NextSamplingWaistAttAbs;
446 
448  MatrixHomogeneous m_WaistAttitudeMatrixAbsolute;
449 
451  dynamicgraph::Vector m_JointErrorValuesForWalking;
452 
454  dynamicgraph::Vector m_VelocityReference;
455 
457  bool m_trigger;
458 
462  unsigned int m_dataInProcess;
463 
467 
471 
473  bool m_rightFootContact, m_leftFootContact;
474 
481  void ParseCmdFile(std::istringstream &cmdArg, std::ostream &os);
482 
485  void FromAbsoluteFootPosToDotHomogeneous(
486  pg::FootAbsolutePosition aFootPosition, MatrixHomogeneous &aFootMH,
487  MatrixHomogeneous &adotFootMH);
488 
491  void FromAbsoluteFootPosToHomogeneous(pg::FootAbsolutePosition aFootPosition,
492  MatrixHomogeneous &aFootMH);
493 
496  void getAbsoluteWaistPosAttHomogeneousMatrix(MatrixHomogeneous &aWaistMH);
497 
498  void SubsamplingFootPos(pg::FootAbsolutePosition &PrevFootPosition,
499  pg::FootAbsolutePosition &NextFootPosition,
500  MatrixHomogeneous &FootPositionOut,
501  MatrixHomogeneous &dotFootPositionOut,
502  unsigned int &count);
503 
504  void SubsamplingVector(dynamicgraph::Vector &PrevPosition,
505  dynamicgraph::Vector &NextPosition,
506  dynamicgraph::Vector &PositionOut,
507  unsigned int &count);
508 
509  void CopyFootPosition(pg::FootAbsolutePosition &FootPositionIn,
510  pg::FootAbsolutePosition &FootPositionOut);
511 
514  dynamicgraph::Vector &getInitZMPRef(dynamicgraph::Vector &res, int time);
515 
518  dynamicgraph::Vector &getInitCoMRef(dynamicgraph::Vector &res, int time);
519 
522  dynamicgraph::Vector &getInitWaistPosRef(dynamicgraph::Vector &res, int time);
523 
526  VectorRollPitchYaw &getInitWaistAttRef(VectorRollPitchYaw &res, int time);
527 
529  MatrixHomogeneous &getInitLeftFootRef(MatrixHomogeneous &res, int time);
530 
532  MatrixHomogeneous &getInitRightFootRef(MatrixHomogeneous &res, int time);
533 
536  bool &getLeftFootContact(bool &res, int time);
537  bool &getRightFootContact(bool &res, int time);
540  int &getContactPhase(int &res, int time);
541 
542  public:
546  SignalPtr<dynamicgraph::Vector, int> jointPositionSIN;
547 
549  SignalPtr<dynamicgraph::Vector, int> motorControlJointPositionSIN;
550 
552  SignalPtr<dynamicgraph::Vector, int> ZMPPreviousControllerSIN;
553 
555  SignalTimeDependent<dynamicgraph::Vector, int> ZMPRefSOUT;
556 
558  SignalTimeDependent<dynamicgraph::Vector, int> CoMRefSOUT;
559 
561  SignalTimeDependent<dynamicgraph::Vector, int> dCoMRefSOUT;
562 
563  SignalTimeDependent<dynamicgraph::Vector, int> ddCoMRefSOUT;
565  SignalPtr<dynamicgraph::Vector, int> comSIN;
566 
568  SignalPtr<dynamicgraph::Vector, int> comStateSIN;
569 
571  SignalPtr<dynamicgraph::Vector, int> zmpSIN;
572 
575  SignalPtr<dynamicgraph::Vector, int> forceSIN;
576  SignalTimeDependent<dynamicgraph::Vector, int> forceSOUT;
577  dynamicgraph::Vector m_initForce;
578  dynamicgraph::Vector m_currentForces;
579  std::deque<dynamicgraph::Vector> m_bufferForce;
580  std::vector<double> m_filterWindow;
581 
583  SignalPtr<dynamicgraph::Vector, int> velocitydesSIN;
584 
586  SignalPtr<bool, int> triggerSIN;
587 
589  SignalPtr<MatrixHomogeneous, int> LeftFootCurrentPosSIN;
590 
592  SignalPtr<MatrixHomogeneous, int> RightFootCurrentPosSIN;
593 
595  SignalTimeDependent<MatrixHomogeneous, int> LeftFootRefSOUT;
596 
598  SignalTimeDependent<MatrixHomogeneous, int> RightFootRefSOUT;
599 
601  SignalTimeDependent<MatrixHomogeneous, int> dotLeftFootRefSOUT;
602 
604  SignalTimeDependent<MatrixHomogeneous, int> dotRightFootRefSOUT;
605 
608  SignalTimeDependent<MatrixHomogeneous, int> FlyingFootRefSOUT;
609 
611  SignalTimeDependent<int, int> SupportFootSOUT;
612 
614  SignalTimeDependent<dynamicgraph::Vector, int> jointWalkingErrorPositionSOUT;
615 
617  SignalTimeDependent<dynamicgraph::Vector, int> comattitudeSOUT;
618 
620  SignalTimeDependent<dynamicgraph::Vector, int> dcomattitudeSOUT;
621 
623  SignalTimeDependent<dynamicgraph::Vector, int> ddcomattitudeSOUT;
624 
626  SignalTimeDependent<VectorRollPitchYaw, int> waistattitudeSOUT;
627 
629  SignalTimeDependent<VectorRollPitchYaw, int> waistattitudeabsoluteSOUT;
630 
633  SignalTimeDependent<MatrixHomogeneous, int> waistattitudematrixabsoluteSOUT;
634 
636  SignalTimeDependent<dynamicgraph::Vector, int> waistpositionSOUT;
637 
639  SignalTimeDependent<dynamicgraph::Vector, int> waistpositionabsoluteSOUT;
640 
642  SignalTimeDependent<unsigned int, int> dataInProcessSOUT;
643 
645  SignalTimeDependent<dynamicgraph::Vector, int> InitZMPRefSOUT;
646 
648  SignalTimeDependent<dynamicgraph::Vector, int> InitCoMRefSOUT;
649 
651  SignalTimeDependent<dynamicgraph::Vector, int> InitWaistPosRefSOUT;
652 
654  SignalTimeDependent<VectorRollPitchYaw, int> InitWaistAttRefSOUT;
655 
657  SignalTimeDependent<MatrixHomogeneous, int> InitLeftFootRefSOUT;
658 
660  SignalTimeDependent<MatrixHomogeneous, int> InitRightFootRefSOUT;
661 
663  SignalTimeDependent<bool, int> leftFootContactSOUT;
664  SignalTimeDependent<bool, int> rightFootContactSOUT;
669  SignalTimeDependent<int, int> contactPhaseSOUT;
670 
675  protected:
677  Eigen::VectorXd m_ZMPPrevious;
678 
679  public: /* --- PARAMS --- */
680  void initCommands(void);
681  int stringToReferenceEnum(const std::string &FrameReference);
682  void setReferenceFromString(const std::string &str);
683  void addOnLineStep(const double &x, const double &y, const double &th);
684  void addStep(const double &x, const double &y, const double &th);
685  void pgCommandLine(const std::string &cmdline);
686  void useFeedBackSignals(const bool &feedBack);
687  void useDynamicFilter(const bool &dynamicFilter);
688 
689  void debug(void);
690 };
691 
692 } // namespace sot
693 } // namespace dynamicgraph
694 
695 #endif // #ifndef __SOT_PATTERN_GENERATOR_H__
dynamicgraph::sot::PatternGenerator::motorControlJointPositionSIN
SignalPtr< dynamicgraph::Vector, int > motorControlJointPositionSIN
Motor control joint position values.
Definition: pg.h:549
dynamicgraph::sot::PatternGenerator::RightFootRefSOUT
SignalTimeDependent< MatrixHomogeneous, int > RightFootRefSOUT
Externalize the right foot position reference.
Definition: pg.h:598
dynamicgraph::sot::PatternGenerator::waistattitudeabsoluteSOUT
SignalTimeDependent< VectorRollPitchYaw, int > waistattitudeabsoluteSOUT
Externalize the absolute waist attitude.
Definition: pg.h:629
dynamicgraph::sot::PatternGenerator::ZMPRefSOUT
SignalTimeDependent< dynamicgraph::Vector, int > ZMPRefSOUT
Externalize the ZMP reference .
Definition: pg.h:555
exception-pg.h
dynamicgraph::sot::PatternGenerator::m_bufferForce
std::deque< dynamicgraph::Vector > m_bufferForce
Definition: pg.h:579
dynamicgraph::sot::PatternGenerator::m_JointErrorValuesForWalking
dynamicgraph::Vector m_JointErrorValuesForWalking
Joint values for walking.
Definition: pg.h:451
dynamicgraph::sot::PatternGenerator::m_FlyingFootPosition
MatrixHomogeneous m_FlyingFootPosition
Relative Position of the flying foot.
Definition: pg.h:390
dynamicgraph::sot::PatternGenerator::m_init
bool m_init
Boolean variable to initialize the object by loading an object.
Definition: pg.h:159
dynamicgraph::sot::PatternGenerator::dcomattitudeSOUT
SignalTimeDependent< dynamicgraph::Vector, int > dcomattitudeSOUT
Externalize the dcom attitude.
Definition: pg.h:620
dynamicgraph::sot::PatternGenerator::dataInProcessSOUT
SignalTimeDependent< unsigned int, int > dataInProcessSOUT
true iff PG is processing. Use it for synchronize.
Definition: pg.h:642
dynamicgraph::sot::PatternGenerator::m_NextSamplingCOMRefPos
dynamicgraph::Vector m_NextSamplingCOMRefPos
Definition: pg.h:411
dynamicgraph::sot::PatternGenerator::waistattitudematrixabsoluteSOUT
SignalTimeDependent< MatrixHomogeneous, int > waistattitudematrixabsoluteSOUT
Externalize the absolute waist attitude into a homogeneous matrix.
Definition: pg.h:633
dynamicgraph::sot::PatternGenerator::m_dCOMRefPos
dynamicgraph::Vector m_dCOMRefPos
Absolute position of the reference dCoM.
Definition: pg.h:414
dynamicgraph::sot::PatternGenerator::OneStepOfControlS
SignalTimeDependent< Dummy, int > OneStepOfControlS
Internal signal to trigger one step of the algorithm.
Definition: pg.h:277
dynamicgraph::sot::PatternGenerator::FlyingFootRefSOUT
SignalTimeDependent< MatrixHomogeneous, int > FlyingFootRefSOUT
Externalize the foot which is not considered as support foot, the information are given in a relative...
Definition: pg.h:608
dynamicgraph::sot::PatternGenerator::m_forceFeedBack
bool m_forceFeedBack
Booleans used to indicate if force feedback signals shoul be used or not.
Definition: pg.h:470
dynamicgraph::sot::PatternGenerator::m_WaistPositionAbsolute
dynamicgraph::Vector m_WaistPositionAbsolute
Waist position Absolute.
Definition: pg.h:437
dynamicgraph::sot::PatternGenerator::leftFootContactSOUT
SignalTimeDependent< bool, int > leftFootContactSOUT
Booleans for contact of the feet.
Definition: pg.h:663
dynamicgraph::sot::PatternGenerator::waistpositionSOUT
SignalTimeDependent< dynamicgraph::Vector, int > waistpositionSOUT
Externalize the waist position.
Definition: pg.h:636
dynamicgraph
Definition: exception-pg.h:47
dynamicgraph::sot::PatternGenerator::m_InitPositionByRealState
bool m_InitPositionByRealState
Boolean variable to initialize the position: first through the real state of the robot,...
Definition: pg.h:164
dynamicgraph::sot::PatternGenerator::m_PreviewControlParametersFile
std::string m_PreviewControlParametersFile
Some information related to the preview control.
Definition: pg.h:130
dynamicgraph::sot::PatternGenerator::InitWaistPosRefSOUT
SignalTimeDependent< dynamicgraph::Vector, int > InitWaistPosRefSOUT
Externalize the initial Waist reference.
Definition: pg.h:651
dynamicgraph::sot::PatternGenerator::m_NextSamplingRightFootAbsPos
PatternGeneratorJRL::FootAbsolutePosition m_NextSamplingRightFootAbsPos
Definition: pg.h:374
dynamicgraph::sot::PatternGenerator::m_VelocityReference
dynamicgraph::Vector m_VelocityReference
Velocity reference for Herdt's PG.
Definition: pg.h:454
dynamicgraph::sot::PatternGenerator::m_InitCOMRefPos
dynamicgraph::Vector m_InitCOMRefPos
Initial Absolute position of the reference CoM.
Definition: pg.h:431
dynamicgraph::sot::PatternGenerator::m_LocalTime
int m_LocalTime
iteration time.
Definition: pg.h:184
dynamicgraph::sot::PatternGenerator::waistattitudeSOUT
SignalTimeDependent< VectorRollPitchYaw, int > waistattitudeSOUT
Externalize the waist attitude.
Definition: pg.h:626
dynamicgraph::sot::PatternGenerator::m_filterWindow
std::vector< double > m_filterWindow
Definition: pg.h:580
dynamicgraph::sot::PatternGenerator::InitWaistAttRefSOUT
SignalTimeDependent< VectorRollPitchYaw, int > InitWaistAttRefSOUT
Externalize the initial Waist reference.
Definition: pg.h:654
dynamicgraph::sot::PatternGenerator::ZMPPreviousControllerSIN
SignalPtr< dynamicgraph::Vector, int > ZMPPreviousControllerSIN
Previous ZMP value (ZMP send by the preceding controller).
Definition: pg.h:552
dynamicgraph::sot::PatternGenerator::CoMRefSOUT
SignalTimeDependent< dynamicgraph::Vector, int > CoMRefSOUT
Externalize the CoM reference.
Definition: pg.h:558
dynamicgraph::sot::PatternGenerator::m_k_Waist_kp1
MatrixHomogeneous m_k_Waist_kp1
Rigit motion between two waist positions at the beginning of the walking and at the end of the walkin...
Definition: pg.h:368
dynamicgraph::sot::PatternGenerator::m_left_ankle_body_name
std::string m_left_ankle_body_name
Definition: pg.h:192
dynamicgraph::sot::PatternGenerator::m_PrevSamplingWaistAttAbs
dynamicgraph::Vector m_PrevSamplingWaistAttAbs
Definition: pg.h:444
dynamicgraph::sot::PatternGenerator::m_InitRightFootPosition
MatrixHomogeneous m_InitRightFootPosition
Definition: pg.h:384
dynamicgraph::sot::PatternGenerator::m_RightFootPosition
MatrixHomogeneous m_RightFootPosition
Definition: pg.h:371
dynamicgraph::sot::PatternGenerator::m_PrevSamplingdCOMRefPos
dynamicgraph::Vector m_PrevSamplingdCOMRefPos
Definition: pg.h:415
dynamicgraph::sot::PatternGenerator::velocitydesSIN
SignalPtr< dynamicgraph::Vector, int > velocitydesSIN
Take the current desired velocity.
Definition: pg.h:583
dynamicgraph::sot::PatternGenerator::m_AnkleSoilDistance
double m_AnkleSoilDistance
Distance between ankle and soil.
Definition: pg.h:173
dynamicgraph::sot::PatternGenerator::m_ZMPRefPos
dynamicgraph::Vector m_ZMPRefPos
Absolute position of the reference ZMP.
Definition: pg.h:393
dynamicgraph::sot::PatternGenerator::forceSIN
SignalPtr< dynamicgraph::Vector, int > forceSIN
Take the current external force applied to the com (fx, fy, fz).
Definition: pg.h:575
dynamicgraph::sot::PatternGenerator::m_robotData
pinocchio::Data * m_robotData
The pointor toward the robot data.
Definition: pg.h:122
dynamicgraph::sot::DOUBLE_SUPPORT_PHASE
@ DOUBLE_SUPPORT_PHASE
Definition: pg.h:67
dynamicgraph::sot::PatternGenerator::triggerSIN
SignalPtr< bool, int > triggerSIN
Take the current trigger to start OneStepOfControl.
Definition: pg.h:586
dynamicgraph::sot::PatternGenerator::m_xmlRankFile
std::string m_xmlRankFile
Directory+Name where the Rank of the joints are notified.
Definition: pg.h:142
dynamicgraph::sot::PatternGenerator::m_right_ankle_body_name
std::string m_right_ankle_body_name
Definition: pg.h:195
dynamicgraph::sot::LEFT_SUPPORT_PHASE
@ LEFT_SUPPORT_PHASE
Definition: pg.h:68
dynamicgraph::sot::PatternGenerator::m_COMRefPos
dynamicgraph::Vector m_COMRefPos
Absolute position of the reference CoM.
Definition: pg.h:409
dynamicgraph::sot::PatternGenerator::m_InitZMPRefPos
dynamicgraph::Vector m_InitZMPRefPos
Initial Absolute position of the reference ZMP.
Definition: pg.h:424
dynamicgraph::sot::RIGHT_SUPPORT_PHASE
@ RIGHT_SUPPORT_PHASE
Definition: pg.h:69
dynamicgraph::sot::PatternGenerator::GetPatternGeneratorInterface
pg::PatternGeneratorInterface * GetPatternGeneratorInterface()
Give access directly to the pattern generator... You really have to know what your are doing.
Definition: pg.h:260
dynamicgraph::sot::PatternGenerator::m_WaistAttitude
dynamicgraph::Vector m_WaistAttitude
Waist Attitude.
Definition: pg.h:440
dynamicgraph::sot::PatternGenerator::m_NextSamplingddCOMRefPos
dynamicgraph::Vector m_NextSamplingddCOMRefPos
Definition: pg.h:421
dynamicgraph::sot::PatternGenerator::forceSOUT
SignalTimeDependent< dynamicgraph::Vector, int > forceSOUT
Definition: pg.h:576
dynamicgraph::sot::PatternGenerator::m_left_wrist_body_name
std::string m_left_wrist_body_name
Definition: pg.h:198
dynamicgraph::sot::PatternGenerator::m_dComAttitude
dynamicgraph::Vector m_dComAttitude
dCom Attitude: does not really exist apart when the robot is seen as an inverted pendulum
Definition: pg.h:402
dynamicgraph::sot::PatternGenerator::m_InitWaistRefPos
dynamicgraph::Vector m_InitWaistRefPos
Initial Absolute position and attitude of the reference Waist.
Definition: pg.h:428
dynamicgraph::sot::PatternGenerator::m_dataInProcess
unsigned int m_dataInProcess
true iff the pattern if dealing with data, false if pg is not working anymore/yet.
Definition: pg.h:462
dynamicgraph::sot::PatternGenerator::LeftFootRefSOUT
SignalTimeDependent< MatrixHomogeneous, int > LeftFootRefSOUT
Externalize the left foot position reference.
Definition: pg.h:595
dynamicgraph::sot::PatternGenerator::zmpSIN
SignalPtr< dynamicgraph::Vector, int > zmpSIN
Take the current zmp (x, y, z).
Definition: pg.h:571
dynamicgraph::sot::PatternGenerator::m_TimeStep
double m_TimeStep
Time step.
Definition: pg.h:176
dynamicgraph::sot::PatternGenerator::LeftFootCurrentPosSIN
SignalPtr< MatrixHomogeneous, int > LeftFootCurrentPosSIN
Take the current left foot homogeneous position.
Definition: pg.h:589
dynamicgraph::sot::PatternGenerator::specialJoints_
std::map< std::string, std::string > specialJoints_
Definition: pg.h:153
dynamicgraph::sot::PatternGenerator::m_count
unsigned int m_count
count for subsampling.
Definition: pg.h:187
dynamicgraph::sot::SupportPhase
SupportPhase
Define the support phase of the robot.
Definition: pg.h:66
dynamicgraph::sot::PatternGenerator::m_urdfFile
std::string m_urdfFile
Directory+Name where the URDF file of the robot's model is located.
Definition: pg.h:134
dynamicgraph::sot::PatternGenerator::m_PrevSamplingLeftFootAbsPos
PatternGeneratorJRL::FootAbsolutePosition m_PrevSamplingLeftFootAbsPos
Definition: pg.h:373
dynamicgraph::sot::PatternGenerator::m_PGI
pg::PatternGeneratorInterface * m_PGI
Pointer towards the interface of the pattern generator.
Definition: pg.h:124
dynamicgraph::sot::PatternGenerator::dCoMRefSOUT
SignalTimeDependent< dynamicgraph::Vector, int > dCoMRefSOUT
Externalize the CoM reference.
Definition: pg.h:561
dynamicgraph::sot::PatternGenerator::InitRightFootRefSOUT
SignalTimeDependent< MatrixHomogeneous, int > InitRightFootRefSOUT
Externalize the right foot position reference.
Definition: pg.h:660
dynamicgraph::sot::PatternGenerator::m_WaistAttitudeMatrixAbsolute
MatrixHomogeneous m_WaistAttitudeMatrixAbsolute
Waist Attitude Homogeneous Matrix.
Definition: pg.h:448
dynamicgraph::sot::PatternGenerator::m_PR
pg::PinocchioRobot * m_PR
Pointer towards the robot model inside jrl-walkgen.
Definition: pg.h:120
dynamicgraph::sot::PatternGenerator::m_NextSamplingLeftFootAbsPos
PatternGeneratorJRL::FootAbsolutePosition m_NextSamplingLeftFootAbsPos
Definition: pg.h:375
dynamicgraph::sot::PatternGenerator::m_MotionSinceInstanciationToThisSequence
MatrixHomogeneous m_MotionSinceInstanciationToThisSequence
Keep track of the motion between sequence of motions.
Definition: pg.h:387
dynamicgraph::sot::PatternGenerator::m_ReferenceFrame
int m_ReferenceFrame
Keep the frame reference.
Definition: pg.h:170
dynamicgraph::sot::PatternGenerator::m_InitLeftFootAbsPos
PatternGeneratorJRL::FootAbsolutePosition m_InitLeftFootAbsPos
Definition: pg.h:377
dynamicgraph::sot::PatternGenerator::waistpositionabsoluteSOUT
SignalTimeDependent< dynamicgraph::Vector, int > waistpositionabsoluteSOUT
Externalize the absolute waist position.
Definition: pg.h:639
dynamicgraph::sot::PatternGenerator
This class provides dynamically stable CoM, ZMP, feet trajectories. It wraps up the algorithms implem...
Definition: pg.h:84
dynamicgraph::sot::PatternGenerator::m_PrevSamplingRightFootAbsPos
PatternGeneratorJRL::FootAbsolutePosition m_PrevSamplingRightFootAbsPos
Definition: pg.h:372
dynamicgraph::sot::PatternGenerator::comStateSIN
SignalPtr< dynamicgraph::Vector, int > comStateSIN
Take the current CoM state (pos, vel, acc).
Definition: pg.h:568
dynamicgraph::sot::PatternGenerator::m_NextSamplingdCOMRefPos
dynamicgraph::Vector m_NextSamplingdCOMRefPos
Definition: pg.h:416
dynamicgraph::sot::PatternGenerator::m_initForce
dynamicgraph::Vector m_initForce
Definition: pg.h:577
dynamicgraph::sot::PatternGenerator::contactPhaseSOUT
SignalTimeDependent< int, int > contactPhaseSOUT
Int Vector of support phase: leftFoot=1, rightFoot=-1, doubleSupport=0 (see enum).
Definition: pg.h:669
dynamicgraph::sot::PatternGenerator::m_PrevSamplingddCOMRefPos
dynamicgraph::Vector m_PrevSamplingddCOMRefPos
Definition: pg.h:420
dynamicgraph::sot::PatternGenerator::m_WaistPosition
dynamicgraph::Vector m_WaistPosition
Waist position.
Definition: pg.h:434
dynamicgraph::sot::PatternGenerator::comSIN
SignalPtr< dynamicgraph::Vector, int > comSIN
Take the current CoM.
Definition: pg.h:565
dynamicgraph::sot::PatternGenerator::m_dotRightFootPosition
MatrixHomogeneous m_dotRightFootPosition
Definition: pg.h:380
dynamicgraph::sot::PatternGenerator::dotLeftFootRefSOUT
SignalTimeDependent< MatrixHomogeneous, int > dotLeftFootRefSOUT
Externalize the left foot position reference.
Definition: pg.h:601
dynamicgraph::sot::PatternGenerator::m_WaistAttitudeAbsolute
dynamicgraph::Vector m_WaistAttitudeAbsolute
Waist Attitude Absolute.
Definition: pg.h:443
dynamicgraph::sot::PatternGenerator::ddCoMRefSOUT
SignalTimeDependent< dynamicgraph::Vector, int > ddCoMRefSOUT
Definition: pg.h:563
dynamicgraph::sot::PatternGenerator::SupportFootSOUT
SignalTimeDependent< int, int > SupportFootSOUT
Externalize the support foot.
Definition: pg.h:611
dynamicgraph::sot::PatternGenerator::m_soleLength
double m_soleLength
Lenght of the sole.
Definition: pg.h:147
dynamicgraph::sot::PatternGenerator::m_currentForces
dynamicgraph::Vector m_currentForces
Definition: pg.h:578
dynamicgraph::sot::PatternGenerator::dotRightFootRefSOUT
SignalTimeDependent< MatrixHomogeneous, int > dotRightFootRefSOUT
Externalize the right foot position reference.
Definition: pg.h:604
dynamicgraph::sot::PatternGenerator::firstSINTERN
SignalTimeDependent< Dummy, int > firstSINTERN
Internal signal for initialization and one shot signals.
Definition: pg.h:274
dynamicgraph::sot::PatternGenerator::m_rightFootContact
bool m_rightFootContact
Booleans used to indicate feet contacts.
Definition: pg.h:473
dynamicgraph::sot::PatternGenerator::RightFootCurrentPosSIN
SignalPtr< MatrixHomogeneous, int > RightFootCurrentPosSIN
Take the current right foot homogeneous position.
Definition: pg.h:592
dynamicgraph::sot::PatternGenerator::m_ddComAttitude
dynamicgraph::Vector m_ddComAttitude
ddCom Attitude: does not really exist apart when the robot is seen as an inverted pendulum
Definition: pg.h:406
dynamicgraph::sot::PatternGenerator::InitZMPRefSOUT
SignalTimeDependent< dynamicgraph::Vector, int > InitZMPRefSOUT
Externalize the initial ZMP reference .
Definition: pg.h:645
dynamicgraph::sot::PatternGenerator::m_NextSamplingWaistAttAbs
dynamicgraph::Vector m_NextSamplingWaistAttAbs
Definition: pg.h:445
dynamicgraph::sot::PatternGenerator::jointPositionSIN
SignalPtr< dynamicgraph::Vector, int > jointPositionSIN
Real state position values.
Definition: pg.h:546
dynamicgraph::sot::PatternGenerator::rightFootContactSOUT
SignalTimeDependent< bool, int > rightFootContactSOUT
Definition: pg.h:664
dynamicgraph::sot::PatternGenerator::m_ContactPhase
SupportPhase m_ContactPhase
Current support/contact phase defined by enum: leftFoot=1, rightFoot=-1, doubleSupport=0.
Definition: pg.h:180
dynamicgraph::sot::PatternGenerator::m_DSStartingTime
int m_DSStartingTime
Definition: pg.h:181
dynamicgraph::sot::PatternGenerator::m_feedBackControl
bool m_feedBackControl
Booleans used to indicate if feedback signals shoul be used or not.
Definition: pg.h:466
dynamicgraph::sot::PatternGenerator::m_PrevSamplingCOMRefPos
dynamicgraph::Vector m_PrevSamplingCOMRefPos
Definition: pg.h:410
dynamicgraph::sot::PatternGenerator::m_InitRightFootAbsPos
PatternGeneratorJRL::FootAbsolutePosition m_InitRightFootAbsPos
Definition: pg.h:376
dynamicgraph::sot::PatternGenerator::m_ZMPPrevious
Eigen::VectorXd m_ZMPPrevious
Definition: pg.h:677
dynamicgraph::sot::PatternGenerator::m_robotModel
pinocchio::Model m_robotModel
The model of the robot.
Definition: pg.h:118
dynamicgraph::sot::PatternGenerator::m_wrml2urdfIndex
std::vector< unsigned > m_wrml2urdfIndex
Definition: pg.h:144
dynamicgraph::sot::PatternGenerator::jointWalkingErrorPositionSOUT
SignalTimeDependent< dynamicgraph::Vector, int > jointWalkingErrorPositionSOUT
Externalize the joint values for walking.
Definition: pg.h:614
dynamicgraph::sot::PatternGenerator::comattitudeSOUT
SignalTimeDependent< dynamicgraph::Vector, int > comattitudeSOUT
Externalize the com attitude.
Definition: pg.h:617
dynamicgraph::sot::PatternGenerator::InitLeftFootRefSOUT
SignalTimeDependent< MatrixHomogeneous, int > InitLeftFootRefSOUT
Externalize the left foot position reference.
Definition: pg.h:657
dynamicgraph::sot::PatternGenerator::m_srdfFile
std::string m_srdfFile
Directory+Name where the SRDF file of the robot's model is located.
Definition: pg.h:138
dynamicgraph::sot::PatternGenerator::ddcomattitudeSOUT
SignalTimeDependent< dynamicgraph::Vector, int > ddcomattitudeSOUT
Externalize the ddcom attitude.
Definition: pg.h:623
dynamicgraph::sot::PatternGenerator::m_soleWidth
double m_soleWidth
Width of the sole.
Definition: pg.h:150
dynamicgraph::sot::PatternGenerator::m_ComAttitude
dynamicgraph::Vector m_ComAttitude
Com Attitude: does not really exist apart from when the robot is seen as an inverted pendulum.
Definition: pg.h:398
PatternGenerator_EXPORT
#define PatternGenerator_EXPORT
Definition: pg.h:59
dynamicgraph::sot::PatternGenerator::m_SupportFoot
int m_SupportFoot
Integer for the support foot.
Definition: pg.h:167
dynamicgraph::sot::PatternGenerator::m_ddCOMRefPos
dynamicgraph::Vector m_ddCOMRefPos
Absolute position of the reference ddCoM.
Definition: pg.h:419
dynamicgraph::sot::PatternGenerator::m_trigger
bool m_trigger
trigger to start walking
Definition: pg.h:457
dynamicgraph::sot::PatternGenerator::InitCoMRefSOUT
SignalTimeDependent< dynamicgraph::Vector, int > InitCoMRefSOUT
Externalize the initial CoM reference.
Definition: pg.h:648
dynamicgraph::sot::PatternGenerator::m_right_wrist_body_name
std::string m_right_wrist_body_name
Definition: pg.h:201