robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
mpc_periodic_swing_foot_ref.hpp
Go to the documentation of this file.
1#ifndef ROBOTOC_MPC_PERIODIC_SWING_FOOT_REF_HPP_
2#define ROBOTOC_MPC_PERIODIC_SWING_FOOT_REF_HPP_
3
4#include "Eigen/Core"
5
10
11
12namespace robotoc {
13
19public:
30 MPCPeriodicSwingFootRef(const int contact_index,
31 const double swing_height, const double swing_start_time,
32 const double period_swing, const double period_stance,
33 const int num_phases_in_period=1);
34
39
48 void setPeriod(const double swing_start_time, const double period_swing,
49 const double period_stance, const int num_phases_in_period=1);
50
58 void setSwingFootRef(const std::shared_ptr<ContactSequence>& contact_sequence,
59 const std::shared_ptr<ContactPlannerBase>& foot_step_planner);
60
61 void updateRef(const GridInfo& grid_info, Eigen::VectorXd& x3d_ref) const override;
62
63 bool isActive(const GridInfo& grid_info) const override;
64
65private:
66 int contact_index_;
67 std::vector<Eigen::Vector3d> contact_position_;
68 std::vector<bool> is_contact_active_;
69 double swing_height_, swing_start_time_, period_swing_, period_stance_, period_;
70 int num_phases_in_period_;
71};
72
73} // namespace robotoc
74
75#endif // ROBOTOC_MPC_PERIODIC_SWING_FOOT_REF_HPP_
Periodic reference of the foot position.
Definition: mpc_periodic_swing_foot_ref.hpp:18
void setPeriod(const double swing_start_time, const double period_swing, const double period_stance, const int num_phases_in_period=1)
Set period.
MPCPeriodicSwingFootRef(const int contact_index, const double swing_height, const double swing_start_time, const double period_swing, const double period_stance, const int num_phases_in_period=1)
Constructor.
void setSwingFootRef(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....
bool isActive(const GridInfo &grid_info) const override
Checks wheather the cost is active or not at the specified time.
void updateRef(const GridInfo &grid_info, Eigen::VectorXd &x3d_ref) const override
Computes the reference task-space position.
Base class of reference task space position.
Definition: task_space_3d_ref_base.hpp:15
Definition: constraint_component_base.hpp:17
Grid information.
Definition: grid_info.hpp:24