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上找到。
有关构建库文档的信息,请查看本指南。
贡献
欢迎投稿! 在帮助这个项目保持受欢迎之前,请阅读我们的行为准则。
项目详情
关
adafruit_circuitpython_rplidar -1.2.10-py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 033153740b289bd99c5184f906072d853e5e835712a85cefcc0297554c77201e |
|
| MD5 | 307d1c24c6591a5e4d125c761dc0469a |
|
| 布莱克2-256 | df14411e90cbca5adeb8d9fc6e0ed61f2e8145a37fed8c471170958e95349260 |