Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 driver and real-time scan viewer #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Python3 driver and real-time scan viewer #7

wants to merge 3 commits into from

Conversation

ryan-brazeal-ufl
Copy link

I have created a simple Python3 class object that can be used as a driver for the RPLidar sensors and/or it can be used as a real-time scan viewer on any computer (Windows, Mac, Linux). The viewer uses the PyGame library and does a good job (performance wise) of displaying the point cloud data stream. The user can navigate within the viewer to zoom, pan and rotate the point cloud view using either their mouse or keyboard. Additionally, a text-based (.csv) file is created that stores all the point cloud data, along with the scan (rotation) number, and return intensity (for standard scans).

Python3 driver is based on the most recent protocol documentation published by SlamTec (as of Dec, 2018). This does NOT include the new ~16000 pulse rate supported by the A3 sensor, because this feature is not yet documented by SlamTec and I don't feel like trying to reverse engineer the feature out of the C++ code.
@willstott101
Copy link

Nice job! Thanks for having a crack at this.

I'm not a contributor to this project, nor am I yet using an RPLidar, so feel free to ignore the following: It would be ideal for integrating into other projects if the Driver and Viewer were in separate Python modules. This would allow usage of the Lidar without the pygame dependency.

@yaoyannan1111
Copy link

Thanks very much for your job.
I encountered a problem in testing the code: when I use the function start_express_scan(), it worked well, but if I change to use the function start_standard_scan(),it could't receive scan data from the lidar. The radar model I use is A1M8 from SLAMTEC. Moreover, when I use serial debugging assistant, it worked normally in both modes(express_scan and standard_scan). I tried to debug the code and I found in the standard_scan mode when I send request message "A5 20", the serial can receive Initial response of "A5 5A 05 00 00 40 81", and then receive nothing. Do you know where the problem is?
standard_scan

@ryan-brazeal-ufl
Copy link
Author

ryan-brazeal-ufl commented May 8, 2020 via email

@NouriHuseynov
Copy link

NouriHuseynov commented Sep 6, 2021

Hi everyone,
if you read this post, it will significate that you want to communicate with LiDAR in order to integrate it to your project. So, I thinks that my work can interest you, check it at this link : https://github.com/NouriHuseynov/LiDAR_A1M8.git
BR,
Nouri Huseynov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants