19 #ifndef OP3_ONLINE_WALKING_MODULE_WALKING_CONTROL_ 20 #define OP3_ONLINE_WALKING_MODULE_WALKING_CONTROL_ 29 #include <geometry_msgs/Pose2D.h> 30 #include <eigen3/Eigen/Eigen> 31 #include "op3_online_walking_module_msgs/FootStepCommand.h" 32 #include "op3_online_walking_module_msgs/FootStepArray.h" 33 #include "op3_online_walking_module_msgs/PreviewResponse.h" 34 #include "op3_online_walking_module_msgs/Step2D.h" 35 #include "op3_online_walking_module_msgs/Step2DArray.h" 55 double dsp_ratio,
double lipm_height,
double foot_height_max,
double zmp_offset_x,
double zmp_offset_y,
56 std::vector<double_t> x_lipm, std::vector<double_t> y_lipm,
57 double foot_distance);
60 void initialize(op3_online_walking_module_msgs::FootStepCommand foot_step_command,
61 std::vector<double_t> init_body_pos, std::vector<double_t> init_body_Q,
62 std::vector<double_t> init_r_foot_pos, std::vector<double_t> init_r_foot_Q,
63 std::vector<double_t> init_l_foot_pos, std::vector<double_t> init_l_foot_Q);
64 void initialize(op3_online_walking_module_msgs::Step2DArray foot_step_2d,
65 std::vector<double_t> init_body_pos, std::vector<double_t> init_body_Q,
66 std::vector<double_t> init_r_foot_pos, std::vector<double_t> init_r_foot_Q,
67 std::vector<double_t> init_l_foot_pos, std::vector<double_t> init_l_foot_Q);
70 void set(
double time,
int step,
bool foot_step_2d);
82 std::vector<double_t> P,
int P_row,
int P_col);
91 std::vector<double_t> &r_foot_pos,
92 std::vector<double_t> &body_pos);
94 std::vector<double_t> &r_foot_vel,
95 std::vector<double_t> &body_vel);
97 std::vector<double_t> &r_foot_accel,
98 std::vector<double_t> &body_accel);
100 std::vector<double_t> &r_foot_Q,
101 std::vector<double_t> &body_Q);
102 void getLIPM(std::vector<double_t> &x_lipm, std::vector<double_t> &y_lipm);
void getWalkingPosition(std::vector< double_t > &l_foot_pos, std::vector< double_t > &r_foot_pos, std::vector< double_t > &body_pos)
op3_online_walking_module_msgs::PreviewResponse preview_response_
void transformFootStep2D()
std::vector< double_t > des_l_foot_pos_
std::vector< double_t > init_r_foot_pos_
op3_online_walking_module_msgs::FootStepCommand foot_step_command_
Eigen::Quaterniond des_l_foot_Q_
void calcRefZMP(int step)
std::vector< double_t > goal_l_foot_accel_
void getWalkingState(int &walking_leg, int &walking_phase)
std::vector< double_t > init_l_foot_accel_
void initialize(op3_online_walking_module_msgs::FootStepCommand foot_step_command, std::vector< double_t > init_body_pos, std::vector< double_t > init_body_Q, std::vector< double_t > init_r_foot_pos, std::vector< double_t > init_r_foot_Q, std::vector< double_t > init_l_foot_pos, std::vector< double_t > init_l_foot_Q)
std::vector< double_t > des_body_vel_
WalkingControl(double control_cycle, double dsp_ratio, double lipm_height, double foot_height_max, double zmp_offset_x, double zmp_offset_y, std::vector< double_t > x_lipm, std::vector< double_t > y_lipm, double foot_distance)
double foot_origin_shift_x_
void calcFootTrajectory(int step)
robotis_framework::PreviewControl * preview_control_
std::vector< double_t > des_body_accel_
Eigen::MatrixXd ref_zmp_buffer_
robotis_framework::MinimumJerkViaPoint * r_foot_tra_
std::vector< double_t > goal_r_foot_vel_
void getWalkingVelocity(std::vector< double_t > &l_foot_vel, std::vector< double_t > &r_foot_vel, std::vector< double_t > &body_vel)
double init_body_yaw_angle_
std::vector< double_t > goal_body_accel_
std::vector< double_t > des_r_foot_accel_
Eigen::MatrixXd goal_l_foot_pos_buffer_
virtual ~WalkingControl()
Eigen::Quaterniond des_body_Q_
double preview_sum_zmp_y_
std::vector< double_t > init_r_foot_vel_
std::vector< double_t > des_l_foot_accel_
std::vector< double_t > init_body_pos_
double calcRefZMPx(int step)
std::vector< double_t > goal_body_pos_
Eigen::Quaterniond init_r_foot_Q_
void calcPreviewParam(std::vector< double_t > K, int K_row, int K_col, std::vector< double_t > P, int P_row, int P_col)
double preview_sum_zmp_x_
void calcFootStepPose(double time, int step)
robotis_framework::MinimumJerk * body_trajectory_
Eigen::Quaterniond goal_body_Q_
std::vector< double_t > goal_r_foot_pos_
Eigen::Quaterniond des_r_foot_Q_
Eigen::Quaterniond init_body_Q_
void getWalkingAccleration(std::vector< double_t > &l_foot_accel, std::vector< double_t > &r_foot_accel, std::vector< double_t > &body_accel)
robotis_framework::MinimumJerkViaPoint * l_foot_tra_
double calcRefZMPy(int step)
std::vector< double_t > des_r_foot_vel_
Eigen::Quaterniond goal_r_foot_Q_
std::vector< double_t > des_body_pos_
op3_online_walking_module_msgs::Step2DArray foot_step_2d_
std::vector< double_t > des_r_foot_pos_
double foot_origin_shift_y_
std::vector< double_t > des_l_foot_vel_
std::vector< double_t > init_body_accel_
Eigen::Quaterniond init_l_foot_Q_
std::vector< double_t > init_body_vel_
std::vector< double_t > init_l_foot_pos_
std::vector< double_t > goal_l_foot_pos_
std::vector< double_t > init_l_foot_vel_
std::vector< double_t > goal_l_foot_vel_
std::vector< double_t > init_r_foot_accel_
void getWalkingOrientation(std::vector< double_t > &l_foot_Q, std::vector< double_t > &r_foot_Q, std::vector< double_t > &body_Q)
void getLIPM(std::vector< double_t > &x_lipm, std::vector< double_t > &y_lipm)
op3_online_walking_module_msgs::FootStepArray foot_step_param_
Eigen::Quaterniond goal_l_foot_Q_
std::vector< double_t > goal_r_foot_accel_
std::vector< double_t > goal_body_vel_
void calcPreviewControl(double time, int step)
Eigen::MatrixXd goal_r_foot_pos_buffer_