Open csukuangfj opened 6 years ago
Closed due to inactivity. If the problem persists, pls feel free to reopen it or create a new one and refer to it.
I think this can be considered as a bug.
@csukuangfj You know this is a question about 3 years ago, we will check and then feedback!
See the code https://github.com/ApolloAuto/apollo/blob/c104ebb3bd95e1331dd99c9df4b3a488615ca767/modules/perception/obstacle/camera/filter/object_camera_filter.cc#L97
Since the essence of the Kalman filter is to linearly combine the predicted state and the measured state, it cannot be used directly to filter an angle.
For an extreme case, suppose the predicted angle is 359 degrees, the measured angle is 1 degree, and the weight is 0.5, the Kalman filter will return (359 + 1) * 0.5 = 180 degrees, which is far from the expected result. The same problem exists if the angle is in the range [-180, 180).