wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.08k stars 611 forks source link

Discrete R is used instead of Continuous R in Pose Estimators #3283

Closed prateekma closed 3 years ago

prateekma commented 3 years ago

The UKF Correct() takes a continuous R and discretizes it internally, but the pose estimators provide an already-discretized R as an argument.

https://github.com/wpilibsuite/allwpilib/blob/main/wpimath/src/main/java/edu/wpi/first/wpilibj/estimator/DifferentialDrivePoseEstimator.java#L146 https://github.com/wpilibsuite/allwpilib/blob/main/wpimath/src/main/native/cpp/estimator/DifferentialDrivePoseEstimator.cpp#L39

prateekma commented 3 years ago

It might also be a good idea to mention that the R must be continuous in the UKF Correct() Javadoc/Doxygen.