33 #include <ifopt/problem.h> 37 #include <ifopt_ipopt/ipopt_adapter.h> 65 using FeetPos = std::vector<Eigen::Vector3d>;
71 cout <<
"************************************************************\n";
72 cout <<
" TOWR - Trajectory Optimizer for Walking Robots (v1.1.0)\n";
73 cout <<
" \u00a9 Alexander W. Winkler\n";
74 cout <<
" https://github.com/ethz-adrl/towr\n";
75 cout <<
"************************************************************";
78 virtual ~TOWR () =
default;
121 ifopt::IpoptAdapter::Solve(
nlp_);
148 nlp_.SetOptVariables(solver_iteration);
156 return nlp_.GetIterationCount();
178 nlp.AddVariableSet(c);
181 nlp.AddConstraintSet(c);
ContraintPtrVec GetConstraints() const
Holds pointers to the robot specific kinematics and dynamics.
VariablePtrVec GetVariableSets()
std::vector< Eigen::Vector3d > FeetPos
void SetSolution(int solver_iteration)
Sets the solution to a previous iteration of solver.
void SetInitialState(const BaseState &base, const FeetPos &feet)
The current state of the robot where the optimization starts from.
void SetParameters(const BaseState &final_base, const Parameters ¶ms, const RobotModel &model, HeightMap::Ptr terrain)
The parameters that determine the type of motion produced.
ContraintPtrVec GetCosts() const
Holds pointers to fully constructed splines, that are linked to the optimization variables.
Can represent the 6Degree-of-Freedom floating base of a robot.
ifopt::Problem BuildNLP()
TOWR - Trajectory Optimizer for Walking Robots.
Holds the parameters to tune the optimization problem.
void SolveNLP()
Constructs the problem and solves it with IPOPT.
int GetIterationCount() const
SplineHolder GetSolution() const
ifopt::Problem nlp_
The solver independent optimization problem formulation.
SplineHolder spline_holder_
std::shared_ptr< HeightMap > Ptr