Nicolas Borla / Mbed OS ROME2_Robot_Firmware
Embed: (wiki syntax)

« Back to documentation index

LIDAR Class Reference

LIDAR Class Reference

This is a device driver class for the Slamtec RP LIDAR A1. More...

#include <LIDAR.h>

Public Member Functions

 LIDAR (RawSerial &serial)
 Creates a LIDAR object.
virtual ~LIDAR ()
 Stops the lidar and deletes this object.
short getDistance (short angle)
 Returns the distance measurement of the lidar at a given angle.
short getDistanceOfBeacon ()
 Returns the distance to a detected beacon.
short getAngleOfBeacon ()
 Returns the angle of a detected beacon.
void lookForBeacon ()
 This method implements an algorithm that looks for the position of a beacon.

Detailed Description

This is a device driver class for the Slamtec RP LIDAR A1.

Definition at line 16 of file LIDAR.h.


Constructor & Destructor Documentation

LIDAR ( RawSerial &  serial )

Creates a LIDAR object.

Parameters:
seriala reference to a serial interface to communicate with the laser scanner.

Definition at line 16 of file LIDAR.cpp.

~LIDAR (  ) [virtual]

Stops the lidar and deletes this object.

Definition at line 46 of file LIDAR.cpp.


Member Function Documentation

short getAngleOfBeacon (  )

Returns the angle of a detected beacon.

Returns:
the angle of the beacon, given in [deg] in the range 0..359.

Definition at line 80 of file LIDAR.cpp.

short getDistance ( short  angle )

Returns the distance measurement of the lidar at a given angle.

Parameters:
anglethe angle, given in [deg] in the range 0..359.
Returns:
the measured distance, given in [mm].

Definition at line 59 of file LIDAR.cpp.

short getDistanceOfBeacon (  )

Returns the distance to a detected beacon.

Returns:
the distance to the beacon, given in [mm], or zero, if no beacon was found.

Definition at line 71 of file LIDAR.cpp.

void lookForBeacon (  )

This method implements an algorithm that looks for the position of a beacon.

It should be called periodically by a low-priority background task.

Definition at line 89 of file LIDAR.cpp.