robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
mpc_periodic_configuration_ref.hpp
Go to the documentation of this file.
1#ifndef ROBOTOC_MPC_PERIODIC_CONFIGURATION_REF_HPP_
2#define ROBOTOC_MPC_PERIODIC_CONFIGURATION_REF_HPP_
3
4#include <vector>
5#include <memory>
6
7#include "Eigen/Core"
8#include "Eigen/Geometry"
9
15
16
17namespace robotoc {
23public:
33 MPCPeriodicConfigurationRef(const Eigen::VectorXd& q,
34 const double swing_start_time,
35 const double period_active,
36 const double period_inactive,
37 const int num_phases_in_period=1);
38
43
52 void setPeriod(const double swing_start_time, const double period_active,
53 const double period_inactive, const int num_phases_in_period=1);
54
62 void setConfigurationRef(const std::shared_ptr<ContactSequence>& contact_sequence,
63 const std::shared_ptr<ContactPlannerBase>& foot_step_planner);
64
65 void updateRef(const Robot& robot, const GridInfo& grid_info,
66 Eigen::VectorXd& q_ref) const override;
67
68 bool isActive(const GridInfo& grid_info) const override;
69
70 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
71
72private:
73 Eigen::VectorXd q_;
75 std::vector<bool> has_inactive_contacts_;
76 double swing_start_time_, period_active_, period_inactive_, period_;
77 int num_phases_in_period_;
78};
79
80} // namespace robotoc
81
82#endif // RROBOTOC_MPC_PERIODIC_CONFIGURATION_REF_HPP_
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.
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