qiayuanl / legged_control

Nonlinear MPC and WBC framework for legged robot based on OCS2 and ros-controls
BSD 3-Clause "New" or "Revised" License
882 stars 221 forks source link

Question about linear_kalman_filter #3

Closed skywoodsz closed 2 years ago

skywoodsz commented 2 years ago

Hi, I have some questions about your linear kalman filter.cpp.

In Mit Cheetah program, they let $$ x = [{}^op{com}, {}^ov{com}, {}^op_i]^T $$

where represents the position of COM, the velocity of COM and the position of foot in the world frame, respectively. Therefore their c matrix is

 _C.block(0, 6, 12, 12) = T(-1) * Eigen::Matrix<T, 12, 12>::Identity();

But in your linear Kalman filter, your c matrix is

c_.block(0, 6, 12, 12) = Eigen::Matrix<scalar_t, 12, 12>::Identity();

What's the difference between your filter and MIT's filter? What variable does y represent in your program? Can you give me some advice, thanks!

qiayuanl commented 2 years ago

It's a typo of mine, the reason the program is still working is I didn't use the foot position from the Kalman filter in other places. I fix it in the latest commit.