We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db51b36 commit 186b343Copy full SHA for 186b343
localization/ekf_localizer/include/ekf_localizer/ekf_localizer.hpp
@@ -79,7 +79,10 @@ class Simple1DFilter
79
dev_ = dev_ + proc_dev_x_d;
80
81
// Update step
82
- double kalman_gain = dev_ / (dev_ + obs_dev);
+ double kalman_gain = 1.0;
83
+ if (dev_ + obs_dev != 0) {
84
+ kalman_gain = dev_ / (dev_ + obs_dev);
85
+ }
86
x_ = x_ + kalman_gain * (obs - x_);
87
dev_ = (1 - kalman_gain) * dev_;
88
0 commit comments