LaserScan
has lots of fields, see if you can understand them. A key one is .ranges
/. ranges
in a python list structure and can be easily manipulated as any other list. you can break the data down into relevant chunks (front view, rear view, etc). for more information, try googling: python list slicing, list comprehension, list basics, could be a few staring points. Notice that the in ranges
is a little noisy. Before you use it, you need to do some filtering. You will find a min_value in the LaserScan
. Check each value you get and if it’s less than the min_value or if its equal to inf
consider it to be zero.