mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 19:47:44 +08:00
删除了message center的指针传递支持,增加了定位bug的技巧文档
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
// app
|
||||
#include "balance.h"
|
||||
#include "vmc_project.h"
|
||||
#include "gain_table.h"
|
||||
#include "robot_def.h"
|
||||
#include "general_def.h"
|
||||
// module
|
||||
#include "HT04.h"
|
||||
#include "LK9025.h"
|
||||
#include "bmi088.h"
|
||||
@@ -6,9 +12,8 @@
|
||||
#include "super_cap.h"
|
||||
#include "controller.h"
|
||||
#include "can_comm.h"
|
||||
// standard
|
||||
#include "stdint.h"
|
||||
#include "robot_def.h"
|
||||
#include "general_def.h"
|
||||
#include "arm_math.h" // 需要用到较多三角函数
|
||||
|
||||
/* 底盘拥有的模块实例 */
|
||||
@@ -47,7 +52,7 @@ static float T_leg_left, T_leg_right; // 左右驱动电机力矩
|
||||
*
|
||||
*/
|
||||
static void CalcLQR()
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,15 +60,15 @@ static void CalcLQR()
|
||||
*
|
||||
*/
|
||||
static void VMCProject()
|
||||
{
|
||||
{ // 拟将功能封装到vmc_project.h中
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 腿部角度控制:转向和抗劈叉
|
||||
*
|
||||
*/
|
||||
static PIDInstance swerving_pid;
|
||||
static PIDInstance anti_crash_pid;
|
||||
static PIDInstance swerving_pid; // 转向PID,有转向指令时使用IMU的加速度反馈积分以获取速度和位置状态量
|
||||
static PIDInstance anti_crash_pid; // 抗劈叉,将输出以相反的方向叠加到左右腿的上
|
||||
|
||||
static void SynthesizeMotion()
|
||||
{
|
||||
@@ -73,15 +78,16 @@ static void SynthesizeMotion()
|
||||
* @brief 腿长控制:长度 + roll轴补偿(保持机体水平),用PD模拟弹簧的传递函数
|
||||
*
|
||||
*/
|
||||
static PIDInstance leg_length_pid;
|
||||
static PIDInstance roll_compensate_pid;
|
||||
static PIDInstance leg_length_pid; // 用PD模拟弹簧的传递函数,不需要积分项(弹簧是一个无积分的二阶系统),增益不可过大否则抗外界冲击响应时太"硬"
|
||||
static PIDInstance roll_compensate_pid; // roll轴补偿,用于保持机体水平
|
||||
|
||||
static void LegControl()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 离地监测和?跳跃控制
|
||||
* @brief 离地监测和?跳跃控制?
|
||||
* 通过模型解算地面的支持力完成离地检测
|
||||
*
|
||||
*/
|
||||
static void FlyDetect()
|
||||
@@ -89,7 +95,7 @@ static void FlyDetect()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 功率限制
|
||||
* @brief 功率限制,一般不需要
|
||||
*
|
||||
*/
|
||||
static void WattLimit()
|
||||
@@ -242,6 +248,7 @@ void BalanceInit()
|
||||
PIDInit(&roll_compensate_pid, &roll_compensate_pid_conf);
|
||||
}
|
||||
|
||||
/* balanceTask可能需要以更高频率运行,以提高线性化的精确程度 */
|
||||
void BalanceTask()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user