changed ID

This commit is contained in:
2026-04-18 16:16:20 +08:00
parent d0b3771bf9
commit df12ca7256
2 changed files with 25 additions and 25 deletions

View File

@@ -104,17 +104,17 @@ void BalanceInit()
.speed_feedback_source = MOTOR_FEED,
},
.motor_type = DM8009P};
joint_conf.can_init_config.tx_id = 1;
joint_conf.can_init_config.rx_id = 11;
joint_conf.can_init_config.tx_id = 3;
joint_conf.can_init_config.rx_id = 14;
joint[LF] = lf = DMMotorInit(&joint_conf);
joint_conf.can_init_config.tx_id = 2;
joint_conf.can_init_config.rx_id = 12;
joint[LB] = lb = DMMotorInit(&joint_conf);
joint_conf.can_init_config.tx_id = 3;
joint_conf.can_init_config.rx_id = 13;
joint[LB] = lb = DMMotorInit(&joint_conf);
joint_conf.can_init_config.tx_id = 1;
joint_conf.can_init_config.rx_id = 12;
joint[RF] = rf = DMMotorInit(&joint_conf);
joint_conf.can_init_config.tx_id = 4;
joint_conf.can_init_config.rx_id = 14;
joint_conf.can_init_config.tx_id = 0;
joint_conf.can_init_config.rx_id = 11;
joint[RB] = rb = DMMotorInit(&joint_conf);
// 驱动轮电机
@@ -132,9 +132,9 @@ void BalanceInit()
};
driven_conf.can_init_config.tx_id = 1;
driven[LD] = l_driven = LKMotorInit(&driven_conf);
driven_conf.can_init_config.tx_id = 2;
driven[RD] = r_driven = LKMotorInit(&driven_conf);
driven_conf.can_init_config.tx_id = 2;
driven[LD] = l_driven = LKMotorInit(&driven_conf);
// 腿长控制
PID_Init_Config_s leg_length_pid_conf = {
@@ -452,10 +452,10 @@ static void LegControl() /* 腿长控制和Roll补偿 */
static void WattLimitSet() /* 设定运动模态的输出 */
{
DMMotorSetRef(lf, 0.2857f * -l_side.T_front); // 根据扭矩常数计算得到的系数 todo 需修改
DMMotorSetRef(lb, 0.2857f * -l_side.T_back);
DMMotorSetRef(rf, 0.2857f * r_side.T_front);
DMMotorSetRef(rb, 0.2857f * r_side.T_back);
DMMotorSetRef(lf, 1.0f * -l_side.T_front); // 根据扭矩常数计算得到的系数 todo 需修改
DMMotorSetRef(lb, 1.0f * -l_side.T_back);
DMMotorSetRef(rf, 1.0f * r_side.T_front);
DMMotorSetRef(rb, 1.0f * r_side.T_back);
LKMotorSetRef(l_driven, 195.3125 * l_side.T_wheel);
LKMotorSetRef(r_driven, 195.3125 * -r_side.T_wheel);