Mobile Robots (EMOR) tutorials at WUT logo Mobile Robots (EMOR) tutorials at WUT

Additionally, you should gather and analyse data from the lidar sensors (the laser range sensors). There are two variables that keep the LIDAR data:

The input variables that describe the pose of the robot: position and orientation are not relevant in this tutorial. The input data from the LIDAR sensor is sufficient to control the movements of the robot in a desired way.

To better understand the data acquired from LIDAR sensor, consider a simple example: lidar_small

In this example the LIRAR sends only three rays and one of them hits an obstacle. The array pts contains end-of-ray points (the contact points of rays with obstacles), and in this particular case it is

-1.6  0.0   1.6
-1.6  -0.5   -1.6
0.08  0.08  0.08

where each column represents x, y and z coordinates of the contact point of the laser ray and an obstacle. If a laser ray is not hitting an obstacle, its contact point is at the end of the ray within a specified range (in the example, the LIDAR range is set to 2 m, so the rays end 2 meters from the sensor). The contacts array contains values indicating if rays hit obstacles. In the example, the array is [0 1 0]. The central ray hits an obstacle, so its corresponding value in the contacts array is 1. Also, its contact point in the pts table is [0, -0.5, 0.08] (it is the central column in the pts array). As the other two rays are not in contact with obstacles, their corresponding values in the contacts array are 0 and their corresponding end-of-ray points in the pts table are at distance of 2 m from the sensor (the maximal range of the sensor in this example).

Please note that the LIDAR sensor used in the simulator has range of 5 m and sends 684 rays, so the lengths of pts table and contacts array are 684.

lidar