添加驱动轮支持力解算

This commit is contained in:
kai
2024-04-30 21:23:03 +08:00
parent 410c23e527
commit 85badbc297
4 changed files with 38 additions and 2 deletions

View File

@@ -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 ||