134 lines
3.7 KiB
C
134 lines
3.7 KiB
C
/*
|
|
* 配置相关
|
|
*/
|
|
|
|
/* Includes ----------------------------------------------------------------- */
|
|
#include "module/config.h"
|
|
|
|
|
|
/* Private typedef ---------------------------------------------------------- */
|
|
/* Private define ----------------------------------------------------------- */
|
|
/* Private macro ------------------------------------------------------------ */
|
|
/* Private variables -------------------------------------------------------- */
|
|
|
|
/* Exported variables ------------------------------------------------------- */
|
|
|
|
// 机器人参数配置
|
|
Config_RobotParam_t robot_config = {
|
|
.quad_params = {
|
|
.ctrl_freq = {
|
|
.pos_alt=100,
|
|
.pos_vel=100,
|
|
.att_agl=250,
|
|
.att_omg=1000
|
|
},
|
|
|
|
.baseThrottle=0.3,
|
|
|
|
.pid = {
|
|
.pit_agl = {
|
|
.k = 1.0f,
|
|
.p = 10.0f,
|
|
.i = 3.0f,
|
|
.d = 0.0f,
|
|
.i_limit = 0.1f,
|
|
.out_limit = 0.1745f,
|
|
.d_cutoff_freq = 0.0f,
|
|
.range = 0.0f
|
|
},
|
|
.rol_agl = {
|
|
.k = 1.0f,
|
|
.p = 10.0f,
|
|
.i = 3.0f,
|
|
.d = 0.0f,
|
|
.i_limit = 0.1f,
|
|
.out_limit = 0.1745f,
|
|
.d_cutoff_freq = 0.0f,
|
|
.range = 0.0f
|
|
},
|
|
.yaw_agl = {
|
|
.k = 1.0f,
|
|
.p = 10.0f,
|
|
.i = 3.0f,
|
|
.d = 0.0f,
|
|
.i_limit = 0.1f,
|
|
.out_limit = 0.1745f,
|
|
.d_cutoff_freq = 0.0f,
|
|
.range = 0.0f
|
|
},
|
|
.pit_omg = {
|
|
.k = 1.0f,
|
|
.p = 0.13f,
|
|
.i = 0.18f,
|
|
.d = 0.005f,
|
|
.i_limit = 0.08f,
|
|
.out_limit = 0.2f,
|
|
.d_cutoff_freq = 15.0f,
|
|
.range = 0.0f
|
|
},
|
|
.rol_omg = {
|
|
.k = 1.0f,
|
|
.p = 0.13f,
|
|
.i = 0.18f,
|
|
.d = 0.005f,
|
|
.i_limit = 0.08f,
|
|
.out_limit = 0.2f,
|
|
.d_cutoff_freq = 15.0f,
|
|
.range = 0.0f
|
|
},
|
|
.yaw_omg = {
|
|
.k = 1.0f,
|
|
.p = 0.13f,
|
|
.i = 0.18f,
|
|
.d = 0.005f,
|
|
.i_limit = 0.08f,
|
|
.out_limit = 0.2f,
|
|
.d_cutoff_freq = 15.0f,
|
|
.range = 0.0f
|
|
},
|
|
.alt_pos = {
|
|
.k = 0.25f,
|
|
.p = 1.0f,
|
|
.i = 0.05f,
|
|
.d = 0.00f,
|
|
.i_limit = 0.5f,
|
|
.out_limit = 3.0f,
|
|
.d_cutoff_freq = 0.0f,
|
|
.range = 0.0f
|
|
},
|
|
.alt_vel = {
|
|
.k = 0.08f,
|
|
.p = 2.2f,
|
|
.i = 0.0f,
|
|
.d = 0.01f,
|
|
.i_limit = 0.0f,
|
|
.out_limit = 0.4f,
|
|
.d_cutoff_freq = 30.0f,
|
|
.range = 0.0f
|
|
},
|
|
|
|
},
|
|
.expect_status_limit = {
|
|
.yaw_omg = 1.0f,
|
|
.rol_agl = 0.1745329f,
|
|
.pit_agl = 0.1745329f
|
|
},
|
|
.motor_limit = {
|
|
.min_output = 0.1f,
|
|
.max_output = 0.9f
|
|
},
|
|
|
|
}
|
|
|
|
};
|
|
|
|
/* Private function prototypes ---------------------------------------------- */
|
|
/* Exported functions ------------------------------------------------------- */
|
|
|
|
/**
|
|
* @brief 获取机器人配置参数
|
|
* @return 机器人配置参数指针
|
|
*/
|
|
Config_RobotParam_t* Config_GetRobotParam(void) {
|
|
return &robot_config;
|
|
} |