diff --git a/.DS_Store b/.DS_Store index 211125c..1fed1b6 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/User/module/config.c b/User/module/config.c index b023f45..6fa9df7 100644 --- a/User/module/config.c +++ b/User/module/config.c @@ -66,7 +66,7 @@ Config_RobotParam_t robot_config = { }, .mech_zero = { .yaw = 0.0f, - .pit = 2.2f, + .pit = 0.137291431f, }, .travel = { .yaw = -1.0f, @@ -312,22 +312,22 @@ Config_RobotParam_t robot_config = { .wheel_radius = 0.068f, .wheel_gear_ratio = 4.5f, .hip_width = 0.423f, /* 髋宽,即两腿间距 (m),用于Roll几何补偿 */ - .joint_zero = {0.0f, 0.0f, 3.84780002f, -1.16999996f}, /* 关节电机零点偏移 */ - .mech_zero_yaw = 1.78040409f, /* 机械零点 */ + .joint_zero = {0.0f, 0.0f, 1.32422018f, 1.16195965f}, /* 关节电机零点偏移 */ + .mech_zero_yaw = 2.96925735f, /* 机械零点 */ }, .leg = { .base_length = 0.16f, /* 基础腿长 (m) */ - .length_range = 0.14f, /* 腿长调节范围 (m) */ + .length_range = 0.20f, /* 腿长调节范围 (m) */ .min_length = 0.14f, /* 最小腿长 (m) */ - .max_length = 0.32f, /* 最大腿长 (m) */ + .max_length = 0.36f, /* 最大腿长 (m) */ .left_base_force = 65.0f, /* 左腿基础支撑力 (N) */ .right_base_force = 65.0f, /* 右腿基础支撑力 (N) */ }, .motion = { .max_acceleration = 5.0f, /* 最大加速度 (m/s^2) */ - .non_contact_theta = 0.15f, /* 离地摆角目标 (rad) */ + .non_contact_theta = -0.01f, /* 离地摆角目标 (rad) */ }, .vmc_param = { @@ -346,21 +346,20 @@ Config_RobotParam_t robot_config = { .hip_length = 0.0f // 髋宽 (L5) (m) } }, - -.lqr_gains = { - .k11_coeff = { -1.040735943750787e+02f, 1.695336079315308e+02f, -1.062722318533942e+02f, -2.036009410634798e+00f }, // theta - .k12_coeff = { 6.548762430498480e+00f, -1.562716155412672e+00f, -7.086308436992302e+00f, -6.164003859622520e-02f }, // d_theta - .k13_coeff = { -1.776351353814282e+00f, 8.427220270224590e+00f, -6.393133271442364e+00f, -3.713664477519095e-01f }, // x - .k14_coeff = { 1.359647364468941e+00f, 7.913856571908151e+00f, -7.833208725786592e+00f, -7.546329731077974e-01f }, // d_x - .k15_coeff = { 1.429505786398442e+02f, -7.876047039197037e+01f, -2.554303654551070e+01f, 2.212282866593371e+01f }, // phi - .k16_coeff = { -1.997399106727281e+00f, 5.001824399333104e+00f, -4.690069699025218e+00f, 2.037393422553355e+00f }, // d_phi - .k21_coeff = { 1.284394973362934e+03f, -1.125809129491189e+03f, 2.348843302245760e+02f, 3.746664923821130e+01f }, // theta - .k22_coeff = { 9.516046669246039e+01f, -8.559942886066267e+01f, 1.574391836522604e+01f, 6.170486282781792e+00f }, // d_theta - .k23_coeff = { 9.476707653135801e+01f, -6.059169561164515e+01f, -6.008849130724805e+00f, 9.727194772869312e+00f }, // x - .k24_coeff = { 5.978001968081441e+01f, -1.457082826094126e+01f, -3.168814217801549e+01f, 1.653069221109999e+01f }, // d_x - .k25_coeff = { 5.255568939661119e+02f, -9.182500565347966e+02f, 5.280210105496553e+02f, -2.568368526903880e+00f }, // phi - .k26_coeff = { 2.647280264629447e+01f, -4.880209725998817e+01f, 3.000044051909971e+01f, -1.227901680130401e+00f }, // d_phi -}, + .lqr_gains = { + .k11_coeff = { -1.997928012118380e+02f, 2.358970856133577e+02f, -1.221432656066952e+02f, -3.660884265594530e+00f }, // theta + .k12_coeff = { 1.144642140244768e+00f, -6.781143989723293e-01f, -8.286867905694857e+00f, -3.233743818654922e-01f }, // d_theta + .k13_coeff = { -2.920908857554099e+01f, 3.294053235814564e+01f, -1.331127106026891e+01f, -2.036633181450379e+00f }, // x + .k14_coeff = { -2.202395151966686e+01f, 2.624258394298977e+01f, -1.238392622003398e+01f, -2.516594294742349e+00f }, // d_x + .k15_coeff = { -5.531234648285231e+01f, 7.666196018790744e+01f, -4.254301644877548e+01f, 1.191958597928930e+01f }, // phi + .k16_coeff = { -8.603393557876432e+00f, 1.181868681749069e+01f, -6.519358011847959e+00f, 2.002836931783026e+00f }, // d_phi + .k21_coeff = { 3.121841964126664e+02f, -2.644789946321499e+02f, 5.653973783920610e+01f, 1.306067415926613e+01f }, // theta + .k22_coeff = { 9.751578045310433e+00f, -8.174866581419979e+00f, 1.060040492386880e+00f, 1.945460420856203e+00f }, // d_theta + .k23_coeff = { -1.589159892148102e+01f, 3.771040781828523e+01f, -2.789168930865428e+01f, 8.354369470743295e+00f }, // x + .k24_coeff = { -3.304075197263637e+01f, 5.411818719230526e+01f, -3.342861600971858e+01f, 9.256855471266778e+00f }, // d_x + .k25_coeff = { 2.574491871362636e+02f, -2.771545105998671e+02f, 1.074894289176479e+02f, 3.130550754680395e+00f }, // phi + .k26_coeff = { 4.162978395880715e+01f, -4.533986766238992e+01f, 1.794589550749570e+01f, 2.032213740678163e-01f }, // d_phi + }, .jump = { diff --git a/User/module/shoot.c b/User/module/shoot.c index cb474d7..46b13ad 100644 --- a/User/module/shoot.c +++ b/User/module/shoot.c @@ -134,7 +134,7 @@ int8_t Shoot_Init(Shoot_t *s, Shoot_Params_t *param, float target_freq) memset(&s->shoot_Anglecalu,0,sizeof(s->shoot_Anglecalu)); memset(&s->output,0,sizeof(s->output)); - s->target_variable.target_rpm=2000.0f; /* 归一化目标转速 */ + s->target_variable.target_rpm=6800.0f; /* 归一化目标转速 */ return 0; }