9 #ifndef SOBEC_OCP_WALK_HPP_
10 #define SOBEC_OCP_WALK_HPP_
12 #include <crocoddyl/core/fwd.hpp>
13 #include <crocoddyl/core/solvers/fddp.hpp>
14 #include <crocoddyl/multibody/fwd.hpp>
15 #include <crocoddyl/multibody/states/multibody.hpp>
16 #include <pinocchio/spatial/force.hpp>
22 using namespace crocoddyl;
66 void readParamsFromYamlStr(std::string& StringToParse);
67 void readParamsFromYamlFile(
const std::string& Filename);
71 boost::shared_ptr<pinocchio::Model>
model;
72 boost::shared_ptr<pinocchio::Data>
data;
74 std::map<pinocchio::FrameIndex, pinocchio::FrameIndex>
towIds, heelIds;
80 const std::string& contactKey,
81 const std::string& referencePosture =
"half_sitting");
85 const Eigen::Ref<const Eigen::MatrixXd> contact_pattern,
int duration,
89 typedef typename MathBaseTpl<double>::VectorXs VectorXd;
90 typedef typename MathBaseTpl<double>::VectorXs Vector3d;
91 typedef typename Eigen::Matrix<double, Eigen::Dynamic, 2> MatrixX2d;
92 typedef typename Eigen::Matrix<double, Eigen::Dynamic, 6> MatrixX6d;
93 typedef std::vector<AMA> ActionList;
95 typename crocoddyl::DifferentialActionModelContactFwdDynamicsTpl<double>
99 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
101 explicit OCPWalk(boost::shared_ptr<OCPRobotWrapper> robot,
102 boost::shared_ptr<OCPWalkParams> params,
103 const Eigen::Ref<const Eigen::MatrixXd> contact_pattern);
107 std::vector<AMA> buildRunningModels();
108 AMA buildTerminalModel();
110 std::pair<std::vector<Eigen::VectorXd>, std::vector<Eigen::VectorXd>>
113 void computeReferenceForces();
123 boost::shared_ptr<StateMultibody>
state;
125 boost::shared_ptr<ActuationModelFloatingBase>
actuation;
132 boost::shared_ptr<OCPRobotWrapper>
robot;
137 #endif // SOBEC_OCP_WALK_HPP_