initial commit
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* @file control_parameters.h
|
||||
* @brief basic control parameters
|
||||
* @author DeepRobotics
|
||||
* @version 1.0
|
||||
* @date 2025-11-07
|
||||
*
|
||||
* @copyright Copyright (c) 2025 DeepRobotics
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "common_types.h"
|
||||
#include "custom_types.h"
|
||||
|
||||
using namespace types;
|
||||
|
||||
class ControlParameters
|
||||
{
|
||||
private:
|
||||
void GenerateM20Parameters();
|
||||
void GenerateFireAntParameters();
|
||||
public:
|
||||
ControlParameters(RobotName robot_name){
|
||||
if(robot_name==RobotName::M20) GenerateM20Parameters();
|
||||
else if(robot_name==RobotName::FireAnt) GenerateFireAntParameters();
|
||||
else{
|
||||
std::cerr << "Not Deafult Robot" << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
~ControlParameters(){}
|
||||
|
||||
/**
|
||||
* @brief robot link length
|
||||
*/
|
||||
float body_len_x_, body_len_y_;
|
||||
float hip_len_, thigh_len_, shank_len_;
|
||||
|
||||
/**
|
||||
* @brief stand height configure
|
||||
*/
|
||||
float pre_height_, stand_height_;
|
||||
|
||||
/**
|
||||
* @brief one leg joint PD gain
|
||||
*/
|
||||
Vec3f swing_leg_kp_, swing_leg_kd_;
|
||||
|
||||
/**
|
||||
* @brief joint position limitation
|
||||
*/
|
||||
Vec3f fl_joint_lower_, fl_joint_upper_;
|
||||
|
||||
/**
|
||||
* @brief joint velocity limitation
|
||||
*/
|
||||
Vec3f joint_vel_limit_;
|
||||
|
||||
/**
|
||||
* @brief joint torque limitation
|
||||
*/
|
||||
Vec3f torque_limit_;
|
||||
|
||||
/**
|
||||
* @brief stand up duration
|
||||
*/
|
||||
float stand_duration_ = 1.5;
|
||||
|
||||
/**
|
||||
* @brief lie down duration
|
||||
*/
|
||||
float liedown_duration_ = 2.0;
|
||||
|
||||
/**
|
||||
* @brief wheel vel limit for wheel-legged robot
|
||||
*/
|
||||
float wheel_vel_limit_ = 100;
|
||||
|
||||
/**
|
||||
* @brief wheel link length to shank
|
||||
*/
|
||||
float wheel_link_len_ = 0.040575;
|
||||
|
||||
/**
|
||||
* @brief policy path
|
||||
*/
|
||||
std::string common_policy_path_;
|
||||
Vec3f common_policy_p_gain_, common_policy_d_gain_;
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
#include "control_parameters.h"
|
||||
|
||||
void ControlParameters::GenerateFireAntParameters(){
|
||||
body_len_x_ = 0.60f;
|
||||
body_len_y_ = 0.32f;
|
||||
hip_len_ = 0.0f;
|
||||
thigh_len_ = 0.0f;
|
||||
shank_len_ = 0.21f;
|
||||
pre_height_ = 0.306f;
|
||||
stand_height_ = 0.306f;
|
||||
swing_leg_kp_ << 80.0f, 80.0f, 80.0f;
|
||||
swing_leg_kd_ << 2.0f, 2.0f, 2.0f;
|
||||
fl_joint_lower_ << -2.792f, -2.792f, -2.809f;
|
||||
fl_joint_upper_ << 2.809f, 2.809f, 2.792f;
|
||||
joint_vel_limit_ << 17.8024f, 17.8024f, 17.8024f;
|
||||
torque_limit_ << 75.0f, 75.0f, 75.0f;
|
||||
wheel_vel_limit_ = 109.956f;
|
||||
wheel_link_len_ = 0.21f;
|
||||
stand_duration_ = 1.5f;
|
||||
liedown_duration_ = 2.0f;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "control_parameters.h"
|
||||
|
||||
void ControlParameters::GenerateM20Parameters(){
|
||||
body_len_x_ = 0.3095*2;
|
||||
body_len_y_ = 0.065*2;
|
||||
hip_len_ = 0.104;
|
||||
thigh_len_ = 0.25;
|
||||
shank_len_ = 0.25;
|
||||
pre_height_ = 0.12;
|
||||
stand_height_ = 0.38;
|
||||
swing_leg_kp_ << 200., 200., 200.;
|
||||
swing_leg_kd_ << 4., 4., 4.;
|
||||
|
||||
fl_joint_lower_ << -0.4363, -2.443, -2.758;
|
||||
fl_joint_upper_ << 0.6109, 2.443, 2.758;
|
||||
joint_vel_limit_ << 45, 22.4, 22.4;
|
||||
torque_limit_ << 32.4, 76.4, 76.4;
|
||||
}
|
||||
Reference in New Issue
Block a user