centroidal_control_collection
DcmTracking.h
Go to the documentation of this file.
1 /* Author: Masaki Murooka */
2 
3 #pragma once
4 
5 #include <map>
6 
7 #include <Eigen/Core>
8 
9 #include <CCC/Constants.h>
10 
11 namespace CCC
12 {
23 {
24 public:
26  struct RefData
27  {
28  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29 
31  Eigen::Vector2d current_zmp = Eigen::Vector2d::Zero();
32 
37  std::map<double, Eigen::Vector2d> time_zmp_list;
38  };
39 
44  using InitialParam = Eigen::Vector2d;
45 
46 public:
51  DcmTracking(double com_height, double feedback_gain = 2.0)
52  : feedback_gain_(feedback_gain), omega_(std::sqrt(constants::g / com_height))
53  {
54  }
55 
64  Eigen::Vector2d planOnce(const RefData & ref_data, const InitialParam & initial_param, double current_time) const;
65 
66 public:
68  double feedback_gain_ = 0;
69 
70 protected:
72  double omega_ = 0;
73 };
74 } // namespace CCC
CCC::constants::g
constexpr double g
Gravitational acceleration [m/s^2].
Definition: Constants.h:10
CCC::DcmTracking::planOnce
Eigen::Vector2d planOnce(const RefData &ref_data, const InitialParam &initial_param, double current_time) const
Plan one step.
CCC::DcmTracking::InitialParam
Eigen::Vector2d InitialParam
Initial parameter.
Definition: DcmTracking.h:44
Constants.h
CCC::DcmTracking::RefData::time_zmp_list
std::map< double, Eigen::Vector2d > time_zmp_list
List of pairs of future ZMP and switching time.
Definition: DcmTracking.h:37
CCC::DcmTracking
Walking control based on tracking of divergent component of motion (DCM).
Definition: DcmTracking.h:22
CCC
Definition: CommonModels.h:7
CCC::DcmTracking::omega_
double omega_
Time constant for inverted pendulum dynamics.
Definition: DcmTracking.h:72
CCC::DcmTracking::DcmTracking
DcmTracking(double com_height, double feedback_gain=2.0)
Constructor.
Definition: DcmTracking.h:51
CCC::DcmTracking::RefData::current_zmp
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector2d current_zmp
Current ZMP [m].
Definition: DcmTracking.h:31
CCC::DcmTracking::feedback_gain_
double feedback_gain_
Feedback gain to calculate control ZMP.
Definition: DcmTracking.h:68
CCC::DcmTracking::RefData
Reference data.
Definition: DcmTracking.h:26