Laser

Laser Component

The laser sensor uses light to measure the distance from the sensor to an object. This is done by timing how long it takes from emitting the light until a reflection is received. The laser sensor performs a sweeping scan of width n (the “field of view”) taking measurements at a resolution r, resulting in n/r measurements. Using the position of the laser sensor on the robot, these distances can be transformed into relative (x, y) coordinates.

The default field of view is π radians (180 degrees) with a resolution of 0.01745 radians (1 degree). The maximum range of the laser is 20 meters and the noise per distance is ±0.001m.

The laser component receives the time of measurement, field of view, resolution, and list of distances from the network relay, transforms them into 2D points and relays them to all connected (higher level) components.

Commands

The laser component accepts the following commands:
  • SENSORDATA: Sensor data received from the network relay component.
The laser component sends the following commands:
  • LASER: The processed laser points with a list of (x, y, distance)

    triples as parameters. Broadcasted to all incoming connections.

class laser.Laser

Implements the laser range finding sensor.

command(client, cmd, params)
Upon receiving the SENSORDATA command, it parses the laserpoints and broadcasts it to other components.
parseLaser(params)
Parses laser data and returns a list of relative 2D coordinates

Table Of Contents

Previous topic

Low level components

Next topic

Sonar

This Page