测位移
This commit is contained in:
parent
bc9801a60a
commit
0ab60f81dd
@ -762,11 +762,11 @@ int8_t Chassis_LQRControl(Chassis_t *c, const Chassis_CMD_t *c_cmd) {
|
||||
|
||||
/* ==================== 目标状态 ==================== */
|
||||
LQR_State_t target_state = {
|
||||
.theta = 0.0f,
|
||||
.theta = 0.0f+c->param->lqr_offset.theta,
|
||||
.d_theta = 0.0f,
|
||||
.phi = 0.0f,
|
||||
.phi = 0.0f+c->param->lqr_offset.phi,
|
||||
.d_phi = 0.0f,
|
||||
.x = c->chassis_state.target_x,
|
||||
.x = c->chassis_state.target_x+c->param->lqr_offset.x,
|
||||
.d_x = c->chassis_state.target_velocity_x,
|
||||
};
|
||||
|
||||
|
||||
@ -48,8 +48,8 @@ function K = get_k_length(leg_length)
|
||||
B=subs(B,[R,L,LM,l,mw,mp,M,Iw,Ip,IM,g],[R1,L1,LM1,l1,mw1,mp1,M1,Iw1,Ip1,IM1,9.8]);
|
||||
B=double(B);
|
||||
|
||||
Q=diag([4000 200 500 50 50000 10]);%theta d_theta x d_x phi d_phi%700 1 600 200 1000 1
|
||||
R=[150 0;0 5]; %T Tp
|
||||
Q=diag([4000 200 1000 500 50000 10]);%theta d_theta x d_x phi d_phi%700 1 600 200 1000 1
|
||||
R=[150 0;0 25]; %T Tp
|
||||
|
||||
K=lqr(A,B,Q,R);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user