RPLidar支持
项目描述
简介
依赖关系
使用PyPy安装: pip install Adafruit_CircuitPython_RPLIDAR 此驱动程序依赖于
请确保所有依赖项都可在CircuitPython文件系统中使用。这可以通过下载Adafruit库和驱动程序包轻松实现。
使用示例
import os
from math import floor
from adafruit_rplidar import RPLidar
# Setup the RPLidar
PORT_NAME = '/dev/ttyUSB0'
lidar = RPLidar(None, PORT_NAME, timeout=3)
# used to scale data to fit on the screen
max_distance = 0
def process_data(data):
print(data)
scan_data = [0]*360
try:
# print(lidar.get_info())
for scan in lidar.iter_scans():
for (_, angle, distance) in scan:
scan_data[min([359, floor(angle)])] = distance
process_data(scan_data)
except KeyboardInterrupt:
print('Stopping.')
lidar.stop()
lidar.disconnect()
文档
此库的API文档可以在Read the Docs上找到。
有关构建库文档的信息,请参阅本指南。
贡献
欢迎贡献!在贡献之前,请阅读我们的行为准则,以帮助本项目保持开放。
项目详情
关闭
散列值 for adafruit_circuitpython_rplidar-1.2.14-py3-none-any.whl
算法 | 散列摘要 | |
---|---|---|
SHA256 | 2989bb66434d549a0d4aed0a266bb62292f01269006eb3709d62b5d9ae54597b |
|
MD5 | 67206ff52af2825f18d741e6624cca38 |
|
BLAKE2b-256 | 003ea615b1a203d314d3859623556836444911cc1e0213cd3a27da286ccc82e2 |