1#ifndef ROBOTOC_MPC_PERIODIC_CONFIGURATION_REF_HPP_
2#define ROBOTOC_MPC_PERIODIC_CONFIGURATION_REF_HPP_
8#include "Eigen/Geometry"
34 const double swing_start_time,
35 const double period_active,
36 const double period_inactive,
37 const int num_phases_in_period=1);
52 void setPeriod(
const double swing_start_time,
const double period_active,
53 const double period_inactive,
const int num_phases_in_period=1);
63 const std::shared_ptr<ContactPlannerBase>& foot_step_planner);
66 Eigen::VectorXd& q_ref)
const override;
70 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
75 std::vector<bool> has_inactive_contacts_;
76 double swing_start_time_, period_active_, period_inactive_, period_;
77 int num_phases_in_period_;
Base class of the configuration.
Definition: configuration_space_ref_base.hpp:16
Periodic reference configuration for MPC of legged robots.
Definition: mpc_periodic_configuration_ref.hpp:22
bool isActive(const GridInfo &grid_info) const override
Checks wheather the cost is active or not at the specified time.
MPCPeriodicConfigurationRef(const Eigen::VectorXd &q, const double swing_start_time, const double period_active, const double period_inactive, const int num_phases_in_period=1)
Constructor.
~MPCPeriodicConfigurationRef()
Destructor.
void setConfigurationRef(const std::shared_ptr< ContactSequence > &contact_sequence, const std::shared_ptr< ContactPlannerBase > &foot_step_planner)
Set the reference positions of CoM from the contact positions of the contact sequence....
void updateRef(const Robot &robot, const GridInfo &grid_info, Eigen::VectorXd &q_ref) const override
Computes the reference configuration.
void setPeriod(const double swing_start_time, const double period_active, const double period_inactive, const int num_phases_in_period=1)
Set period.
Dynamics and kinematics model of robots. Wraps pinocchio::Model and pinocchio::Data....
Definition: robot.hpp:32
Definition: constraint_component_base.hpp:17
std::vector< T, Eigen::aligned_allocator< T > > aligned_vector
std vector with Eigen::aligned_allocator.
Definition: aligned_vector.hpp:14
Grid information.
Definition: grid_info.hpp:24