Reference Source Test
public class | source

LidarDriver

Extends:

src/drivers/motion/MotionDriverSimulator.js~EventEmitter → LidarDriver

Provides an abstraction layer on top of lidar's firmware and algorithms to determine robot's position and obstacles

Method Summary

Public Methods
public

Disable lidar driver

public

enable()

Enable lidar driver

Private Methods
private

Process a measurement and try to make an obstacle approximation.

private

_onDataReceived(data: Buffer)

Process data from lidar

Public Methods

public disable() source

Disable lidar driver

public enable() source

Enable lidar driver

Private Methods

private _addPointToPolyGenerator(angle: Number, distance: Number) source

Process a measurement and try to make an obstacle approximation. It uses bounding box algorithm to make an approximation of the obstacle

Params:

NameTypeAttributeDescription
angle Number

Angle of the measurement

distance Number

Distance to the closest point at given angle

private _onDataReceived(data: Buffer) source

Process data from lidar

Params:

NameTypeAttributeDescription
data Buffer

Buffer from lidar