6 #ifndef CAP_ROBOTMODEL_H
7 #define CAP_ROBOTMODEL_H
10 #include <QGLViewer/frame.h>
11 #include <cap_gait/contrib/Action.h>
12 #include <cap_gait/cap_gait_config.h>
15 namespace margait_contrib
19 using namespace qglviewer;
32 void reset(
bool resetModel =
true);
36 void setOdom(
double comX,
double comY,
double fYaw);
39 void update(
const Pose& pose,
double fusedX,
double fusedY);
42 void setSupportLeg(
int supportLegSign);
45 Vec suppComVector()
const;
46 Vec freeComVector()
const;
47 Vec leftComVector()
const;
48 Vec rightComVector()
const;
51 Vec suppStepVector()
const;
52 Vec freeStepVector()
const;
53 Vec leftStepVector()
const;
54 Vec rightStepVector()
const;
57 Vec suppSwingVector()
const;
58 Vec freeSwingVector()
const;
59 Vec leftSwingVector()
const;
60 Vec rightSwingVector()
const;
63 double suppStepYaw()
const;
64 double freeStepYaw()
const;
65 double leftStepYaw()
const;
66 double rightStepYaw()
const;
69 static double fusedYaw(
const Quaternion& q);
70 static Quaternion quatFromFusedPR(
double fusedX,
double fusedY);
74 void initKinematicModel();
75 void initKinematicHierarchy();
76 void initKinematicTranslations();
77 void initKinematicRotations();
80 void updateLeftRightFootstep();
81 void updateSuppFreeFootstep();
84 void setPose(
const Pose& pose) { this->pose = pose; applyPose(); }
86 void alignModel(
double fusedX,
double fusedY);
89 double getStepYaw(
const Frame& fromFootstep,
const Frame& toFootstep)
const;
93 void robotSpecCallback() { initKinematicTranslations(); }
130 Frame lFootFloorPoint;
136 Frame rFootFloorPoint;
147 bool supportExchange;
148 bool supportExchangeLock;
Configuration struct for the capture step gait.
Definition: cap_gait_config.h:21