vedderb / bldc

The VESC motor control firmware
2.18k stars 1.35k forks source link

Fixup for commit b8e8952e - use reasonable defaults for imu filters #570

Closed surfdado closed 1 year ago

surfdado commented 1 year ago

The default values should be kp=0.3 and beta=0.1 (just like they used to be in 5.3 and before)

Signed-off-by: Dado Mista dadomista@gmail.com

vedderb commented 1 year ago

These are not the default values, these are just higher gains that are used in the very beginning to move the filter towards the correct position faster. If you, for example, boot and the IMU is upside down and you have low gains it can take 10 seconds before it turns around to the correct orientation. By having these high gains in the beginning it will start by turning around quickly and then use the gains from the config. I think @Mitchlol wrote this code, maybe he has a comment on this.

surfdado commented 1 year ago

you're right, I should have looked at your commit more carefully, sorry about that