Understanding How Odometry Is Calculated In The Diff_Drive Controller
I apologize that this question has two parts. If it's better to post two questions, then please let me know.
While reading through the source code of the diff_drive_controller.cpp, I am trying to understand how the two Odometry update methods work.
The "happy" path is the open loop update, which follows basic trigonometry, as defined by the Unicyle Kinematics. Of course this is highly susceptible to dead reckoning because of drift, tire slip, bumps, etc.
The other update seems to be much more involved, calculates a mean position, and some extra steps before applying the trigonometry.
My first question is: Where can I find more information about the model behind the more involved update?
Secondly, even with the second method of update, this odometry calculation does not use any sensors at all, not even a wheel encoder. Does this not create problems? I understand if this is by design so that there's no dependency on any specific hardware; which is a goal of this project.
But then how can I incorporate my own sensors into the control loop? How can I also add some PID to the loop as well?