<jupyter_start><jupyter_text>Laser rangefinder (Lidar)This sensor determines the distance to an object with a laser by measuring the time for the reflected light to return to the receiver.*Lidar* is an acronym of "light detection and ranging" or "laser imaging, detection, and ranging". Modern lidars can deliver 3D scans bust most popular devices used in robotics work in a plane.As shown in the figure, a [basic lidar system](https://en.wikipedia.org/wiki/LidarTechnology) involves a laser range finder reflected by a rotating mirror (top). The laser is scanned around the scene being digitized, in one or two dimensions (middle), gathering distance measurements at specified angle intervals (bottom).The working principle of lidars and ultrasonic sensors is the same, but using light signals instead of sound has several advantages:* faster measurements* better precision* better accuracyNevertheless, lidars might not able to detect transparent or dark-colored objects whereas ultrasonic sensors are not affected.  LDS-01The [LDS-01](https://emanual.robotis.com/docs/en/platform/turtlebot3/appendix_lds_01/) is a small lidar suitable for the TurtleBot 3. It has the following specifications:* `field of view`: 360º* `range`: 120 ~ 3,500 [mm]* `resolution`: 1º  Point cloudsThe lidar measurements can be obtained as $(x,y)$ coordinates of points (a point cloud) and plotted with the following code:<jupyter_code>from TurtleBot3.Controllers import TurtleBot3Robot
robot = TurtleBot3Robot()
import matplotlib.pyplot as plt
x, y = robot.getPointCloud()
plt.plot(0, 0, 'ro');
plt.plot(x, y, '.');
plt.axis('equal');<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07846715328467153, 'fraction_numerical': 0.015206812652068127, 'mean_word_length': 5.714285714285714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '80295', 'license': 'MIT', 'n_tokens_mistral': 479, 'n_tokens_neox': 437, 'n_words': 206, 'path': 'Notebooks/TurtleBot3/Lidar_PointCloud.ipynb', 'repo_name': 'RobInLabUJI/Collaboratory', 'size': '1644'}