pal-robotics/ros_controllers — pull request #15 by efernandez (2013-11-28 08:33:41+00:00)
Title: Odometry: Possible bug

I just want to open a discussion to review this part of the code.

Originally the right/left_wheel_old_pos_ was updated in every iteration.
However, if dt < 0.0001, that value is NOT used, but gets updated.

I think it should only be updated when it's actually used later.
Otherwise, we are missing the real old position of the wheel since the last update of the odometry.

Note that I added some optional formatting to the surrounding code. Sorry for that; if you want I can split it into another commit or just remove all or part of that formatting.