1#ifndef ROBOTOC_UNCONSTR_DIRECT_MULTIPLE_SHOOTING_HPP_
2#define ROBOTOC_UNCONSTR_DIRECT_MULTIPLE_SHOOTING_HPP_
90 const std::vector<
GridInfo>& time_discretization,
100 const std::vector<
GridInfo>& time_discretization,
113 const std::vector<
GridInfo>& time_discretization,
114 const Eigen::VectorXd& q, const Eigen::VectorXd& v,
128 const std::vector<
GridInfo>& time_discretization,
129 const Eigen::VectorXd& q, const Eigen::VectorXd& v,
141 const Eigen::VectorXd& v,
183 const std::vector<
GridInfo>& time_discretization,
184 const
double primal_step_size,
196 const std::vector<
GridInfo>& time_discretization,
197 const
double primal_step_size,
206 Eigen::VectorXd max_primal_step_sizes_, max_dual_step_sizes_;
Dynamics and kinematics model of robots. Wraps pinocchio::Model and pinocchio::Data....
Definition: robot.hpp:32
Direct multiple shooting method of optimal control problems of unconstrained rigid-body systems.
Definition: unconstr_direct_multiple_shooting.hpp:31
void integratePrimalSolution(const aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const double primal_step_size, const Direction &d, Solution &s)
Integrates the primal solution.
void evalKKT(aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const Eigen::VectorXd &q, const Eigen::VectorXd &v, const Solution &s, KKTMatrix &kkt_matrix, KKTResidual &kkt_residual)
Computes the KKT residual and matrix.
UnconstrDirectMultipleShooting(const UnconstrDirectMultipleShooting &)=default
Default copy constructor.
void evalOCP(aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const Eigen::VectorXd &q, const Eigen::VectorXd &v, const Solution &s, KKTResidual &kkt_residual)
Computes the cost and constraint violations.
double maxDualStepSize() const
Gets the maximum dual step size of the fraction-to-boundary-rule.
const PerformanceIndex & getEval() const
Gets the performance index of the evaluation.
static void computeInitialStateDirection(const Eigen::VectorXd &q, const Eigen::VectorXd &v, const Solution &s, Direction &d)
Computes the initial state direction.
UnconstrDirectMultipleShooting(const OCP &ocp, const int nthreads=1)
Construct the direct multiple shooting method.
void computeStepSizes(const std::vector< GridInfo > &time_discretization, KKTMatrix &kkt_matrix, KKTResidual &kkt_residual, Direction &d)
Computes the step sizes via the fraction-to-boundary-rule.
~UnconstrDirectMultipleShooting()=default
Destructor.
void integrateSolution(const aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const double primal_step_size, const double dual_step_size, Direction &d, Solution &s)
Integrates the solution.
UnconstrDirectMultipleShooting & operator=(const UnconstrDirectMultipleShooting &)=default
Default copy assign operator.
bool isFeasible(aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const Solution &s)
Checks whether the solution is feasible under inequality constraints.
void setNumThreads(const int nthreads)
Sets the number of threads of the parallel computations.
double maxPrimalStepSize() const
Gets the maximum primal step size of the fraction-to-boundary-rule.
void initConstraints(aligned_vector< Robot > &robots, const std::vector< GridInfo > &time_discretization, const Solution &s)
Initializes the priaml-dual interior point method for inequality constraints.
UnconstrDirectMultipleShooting(UnconstrDirectMultipleShooting &&) noexcept=default
Default move constructor.
UnconstrDirectMultipleShooting()
Default constructor.
Definition: unconstr_terminal_stage.hpp:31
Definition: constraint_component_base.hpp:17
aligned_vector< SplitKKTMatrix > KKTMatrix
The KKT matrix of the optimal control problem.
Definition: kkt_matrix.hpp:16
aligned_vector< SplitSolution > Solution
Solution to the optimal control problem.
Definition: solution.hpp:16
aligned_vector< SplitDirection > Direction
Newton direction of the solution to the optimal control problem.
Definition: direction.hpp:16
std::vector< T, Eigen::aligned_allocator< T > > aligned_vector
std vector with Eigen::aligned_allocator.
Definition: aligned_vector.hpp:14
aligned_vector< SplitKKTResidual > KKTResidual
The KKT residual of the optimal control problem.
Definition: kkt_residual.hpp:16
Grid information.
Definition: grid_info.hpp:24
The optimal control problem.
Definition: ocp.hpp:22
Data structure for the optimal control problem of unconstrained rigid-body systems.
Definition: unconstr_ocp_data.hpp:17