Robotics StackExchange | Archived questions

Isn't angle_max in sensor_msgs/LaserScan redundant?

If you look at a LaserScan message it has the fields:

Am I wrong, or isn't the angle_max field completely useless and redundant? The max angle can be calculated by:

anglemax = anglemin + angle_increment * ranges.size()

I have never come across a case where anglemax disagreed with that equation. In fact, if there was such a disagreement it would imply a very strange error. Most code I see or write doesn't even use the anglemax reading and chooses to ignore it.

So, is there some use for this that I am missing?

Asked by Sebastian on 2016-04-04 13:33:53 UTC

Comments

hmm maybe against floating point errors? (Just a wild guess)

Asked by Humpelstilzchen on 2016-04-05 02:31:58 UTC

This would make the most sense to me. Especially since laser scans can have thousands of points in them. The slight float point precision error will add up.

Asked by ChuiV on 2019-06-18 11:30:45 UTC

Answers