jmtc7 / Autonomous_Driving_nanodegree_notes

Notes and challenges of my Self-Driving Car Engineer Nanodegree.
https://www.udacity.com/course/self-driving-car-engineer-nanodegree--nd013
GNU General Public License v3.0
6 stars 2 forks source link

Possible division by 0 in Pm05 - EKF-based Sensor Fusion #1

Closed jmtc7 closed 4 years ago

jmtc7 commented 4 years ago

In the _src/kalmanfilter.cpp file of the project of the fifth course module (inside the part 1 of the course), if px*px + py*py is 0, a division by zero will occur.

Possible solution: Check the ekf.x_ variable in src/FusionEKF.cpp, in the update step, before calling the UpdateEKF() function. If both px and py are 0, we should skip the update step (and not update the previous_timestamp_ variable). This way, we will fix a potential runtime problem and will save some computation time not computing the jacobian if it is not going to be used inside UpdateEKF().

NOTE: I open this issue to be fixed in the future.

jmtc7 commented 4 years ago

Closed because the project has been moved into its own independent repository. This issue is now there.