11 template <
class RBDDynamics>
13 const std::string& settingsFile,
14 std::shared_ptr<FBSystem> system,
15 std::shared_ptr<LinearizedSystem> linearizedSystem)
17 linearizedSystem_(linearizedSystem),
18 costFunction_(new
CostFunction(costFunctionFile, false)),
19 optConProblem_(system_, costFunction_, linearizedSystem_),
22 solver_ = std::shared_ptr<NLOptConSolver>(
new NLOptConSolver(optConProblem_, settingsFile));
25 template <
class RBDDynamics>
28 std::shared_ptr<FBSystem> system,
29 std::shared_ptr<LinearizedSystem> linearizedSystem)
31 linearizedSystem_(linearizedSystem),
32 costFunction_(new
CostFunction(costFunctionFile, false)),
33 optConProblem_(system_, costFunction_, linearizedSystem_),
36 solver_ = std::shared_ptr<NLOptConSolver>(
new NLOptConSolver(optConProblem_, settings));
39 template <
class RBDDynamics>
48 solver_->changeTimeHorizon(tf);
49 solver_->setInitialGuess(policy);
50 solver_->changeInitialState(x0.toStateVectorEulerXyz());
53 template <
class RBDDynamics>
56 solver_->configure(settings);
59 template <
class RBDDynamics>
62 bool foundBetter = solver_->runIteration();
68 template <
class RBDDynamics>
72 return solver_->getStates();
75 template <
class RBDDynamics>
79 return solver_->getSolution().x_ref();
82 template <
class RBDDynamics>
85 return solver_->getStateTrajectory().getTimeArray();
88 template <
class RBDDynamics>
92 return solver_->getSolution().K();
95 template <
class RBDDynamics>
99 return solver_->getSolution().uff();
102 template <
class RBDDynamics>
106 return solver_->getSettings();
109 template <
class RBDDynamics>
112 solver_->changeCostFunction(costFunction);
115 template <
class RBDDynamics>
116 std::shared_ptr<typename FloatingBaseNLOCContactModel<RBDDynamics>::NLOptConSolver>
NLOCAlgorithm_t::Policy_t Policy_t