robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
discrete_time_swing_foot_ref.hpp
Go to the documentation of this file.
1#ifndef ROBOTOC_DISCRETE_TIME_SWING_FOOT_REF_HPP_
2#define ROBOTOC_DISCRETE_TIME_SWING_FOOT_REF_HPP_
3
4#include <vector>
5#include <memory>
6
7#include "Eigen/Core"
8
12
13
14namespace robotoc {
15
21public:
27 DiscreteTimeSwingFootRef(const int contact_index, const double step_height);
28
33
39 void setSwingFootRef(const std::shared_ptr<ContactSequence>& contact_sequence);
40
56 void setSwingFootRef(const std::shared_ptr<ContactSequence>& contact_sequence,
57 const Eigen::Vector3d& first_contact_position,
58 const Eigen::Vector3d& last_contact_position,
59 const double first_rate=0, const double last_rate=0);
60
61 void updateRef(const GridInfo& grid_info,
62 Eigen::VectorXd& x3d_ref) const override;
63
64 bool isActive(const GridInfo& grid_info) const override;
65
66private:
67 int contact_index_, num_contact_phases_;
68 double step_height_, first_rate_, last_rate_;
69 std::vector<Eigen::Vector3d> contact_position_;
70 std::vector<bool> is_contact_active_;
71
72};
73
74} // namespace robotoc
75
76#endif // ROBOTOC_DISCRETE_TIME_SWING_FOOT_REF_HPP_
Discrete-time reference of the positions of swinging contact frames.
Definition: discrete_time_swing_foot_ref.hpp:20
void updateRef(const GridInfo &grid_info, Eigen::VectorXd &x3d_ref) const override
Computes the reference task-space position.
DiscreteTimeSwingFootRef(const int contact_index, const double step_height)
Constructor.
void setSwingFootRef(const std::shared_ptr< ContactSequence > &contact_sequence)
Set the reference contact positions from the contact sequence. The first and last contact phases must...
void setSwingFootRef(const std::shared_ptr< ContactSequence > &contact_sequence, const Eigen::Vector3d &first_contact_position, const Eigen::Vector3d &last_contact_position, const double first_rate=0, const double last_rate=0)
Set the reference contact positions from the contact sequence. The first and last contact phases must...
bool isActive(const GridInfo &grid_info) const override
Checks wheather the cost is active or not at the specified time.
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