MRPT / mrpt

:zap: The Mobile Robot Programming Toolkit (MRPT)
https://docs.mrpt.org/reference/latest/
BSD 3-Clause "New" or "Revised" License
1.9k stars 627 forks source link

`rangeImage` wrong format? #1178

Closed christian-rauch closed 2 years ago

christian-rauch commented 2 years ago

In 1.5.8, the CObservation::rangeImage had type CMatrix with units metre ("a matrix of floats with the range data as captured by the camera (in meters)"). In 2.x, this changed to type CMatrix_u16, suggesting that distances are stores as 16bit millimetre, but the documentation still says "a matrix of floats with the range data as captured by the camera (in meters)".

There are two issues here:

  1. the documentation is confusing about the stored unit (metre, millimetre)
  2. changing the unit to millimetre silently breaks many algorithms that read that data and assume it is stored in metres as before
jlblancoc commented 2 years ago

Thanks for raising the issue, @christian-rauch !

  1. the documentation is confusing about the stored unit (metre, millimetre)

It's been fixed in 037863b91598150c482759d2ee2be721f27560b5, within hours it will be reflected on the online docs. Let me know if you still see inconsistencies... maintaining the docs is a huge and endless effort! ;-)

  1. changing the unit to millimetre silently breaks many algorithms that read that data and assume it is stored in metres as before

Sorry for that, here we should have changed the name to break builds after the change, you are right. The change to uint16_t was strongly motivated, though: