unified_frameworks.sensor_array.lidar package

Submodules

unified_frameworks.sensor_array.lidar.LidarClass module

exception unified_frameworks.sensor_array.lidar.LidarClass.LidarDisconnectException

Bases: Exception

unified_frameworks.sensor_array.lidar.actual_lidar module

class unified_frameworks.sensor_array.lidar.actual_lidar.ActualLidar(port=None)

Bases: _Lidar

connect(max_attempts=3, wait_seconds=1, verbose_attempts=False) bool

Make attempts to connect to the Lidar

Parameters

max_attempts: Number of attempts to make wait_seconds: Seconds to wait between each attempt

Returns

True if connection is made

connect_to_RPLidar(max_attempts=3, wait_seconds=1, verbose_attempts=True) bool
disconnect()

Disconnect from the Lidar

get_measures()

Get measures from the lidar as a list of 3-tuples (quality, angle degrees, distance millimeter)

unified_frameworks.sensor_array.lidar.actual_lidar.getDevicePort()

unified_frameworks.sensor_array.lidar.bridge_lidar module

class unified_frameworks.sensor_array.lidar.bridge_lidar.BridgeLidar

Bases: _Lidar

PATH = '/lidar'
connect(max_attempts=3, wait_seconds=1, verbose_attempts=False) bool

Make attempts to connect to the Lidar

Parameters

max_attempts: Number of attempts to make wait_seconds: Seconds to wait between each attempt

Returns

True if connection is made

disconnect()

Disconnect from the Lidar

get_measures()

Get measures from the lidar as a list of 3-tuples (quality, angle degrees, distance millimeter)

unified_frameworks.sensor_array.lidar.fake_lidar module

This file is meant to be a fake lidar script that should be a drop in replacement to the actual RPLidar I think making this will help in testing an optimizing the lidar scripts

class unified_frameworks.sensor_array.lidar.fake_lidar.FakeLidar(points=100, angular_rate=1, translational_rate=1, jitter=0, noise=0, empty_scans=False)

Bases: _Lidar

connect(max_attempts=3, wait_seconds=1, verbose_attempts=True) bool

Make attempts to connect to the Lidar

Parameters

max_attempts: Number of attempts to make wait_seconds: Seconds to wait between each attempt

Returns

True if connection is made

disconnect()

Disconnect from the Lidar

get_measures()

Get measures from the lidar as a list of 3-tuples (quality, angle degrees, distance millimeter)

unified_frameworks.sensor_array.lidar.lidar module

class unified_frameworks.sensor_array.lidar.lidar.Lidar(preference=[<class 'sensor_array.lidar.actual_lidar.ActualLidar'>, <class 'sensor_array.lidar.bridge_lidar.BridgeLidar'>, <class 'sensor_array.lidar.fake_lidar.FakeLidar'>])

Bases: _Abstract_Service

get_obstacles(thresh=1)

Get a list of obstacles where each obstacle is a point cloud of the obstacle

Parameters:

thresh – Points closer than the threshold distance are grouped in the same obstacle

get_point_clouds()

Get a list of point Clouds of from the previous few Lidar scans. Each point cloud is a list of (radians, meters)

start_service()

Connect to the Lidar and start scanning

stop_service()

Stop scanning and disconnect from the lidar

exception unified_frameworks.sensor_array.lidar.lidar.NoLidarException(*args: object)

Bases: Exception

unified_frameworks.sensor_array.lidar.lidar_visualizer module

Module contents