mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-25 11:57:46 +08:00
添加驱动轮支持力解算
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "bsp_log.h"
|
||||
#include "lqr_calc.h"
|
||||
#include "speed_estimation.h"
|
||||
#include "fly_detection.h"
|
||||
|
||||
// 计时变量
|
||||
static uint32_t balance_dwt_cnt;
|
||||
@@ -160,7 +161,7 @@ void BalanceInit()
|
||||
|
||||
// 抗劈叉
|
||||
PID_Init_Config_s anti_crash_pid_conf = {
|
||||
.Kp = 10,
|
||||
.Kp = 15,
|
||||
.Kd = 1,
|
||||
.Ki = 0.0,
|
||||
.MaxOut = 10,
|
||||
@@ -420,6 +421,9 @@ void BalanceTask()
|
||||
// VMC映射成关节输出
|
||||
VMCProject(&l_side);
|
||||
VMCProject(&r_side);
|
||||
// 驱动轮支持力解算
|
||||
NormalForceSolve(&l_side, Chassis_IMU_data, del_t);
|
||||
NormalForceSolve(&r_side, Chassis_IMU_data, del_t);
|
||||
|
||||
// stop表示复位尚未完成,reset表明还未切换到其他模式,故都不执行运动模态的代码
|
||||
if (chassis_status == ROBOT_STOP ||
|
||||
|
||||
Reference in New Issue
Block a user