Happy Hacking!

Wladi ]]>

it’s really only a small step from there. In the above script, we already calculate the distance in mm (dist_mm) for a given angle (angle_rad) of the laserscanner. We can now calculate the x/y-coordinates with respect to the laserscanner/robot-coordinate system:

x = dist_mm*np.cos(angle_rad);

y = dist_mm*np.sin(angle_rad)

For each point, you can calculate these coordinates and put them in a list (e.g. points.append([x,y])), and later convert them to a numpy-array ( points = np.array(poins) ).

For the above plot I used matplotlib:

import matplotlib;

fig = plt.figure();

plt.scatter(points[:,0], points[:,1]);

plt.show();

You can customize the above plot by adding ticks, gridlines, etc.

]]>Now, I am using your code above to convert the string to real number. Shouldn’t line 24 thru 44 be outside the for-loop. Otherwise, it gives an error: „list index out of range“. Would you share the script for extracting the point cloud data and the code for the visualization. Thanks a lot for your help. ]]>