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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,58 @@ Contact Slamtec

If you have any extra questions, please feel free to contact us at our support email:

support AT slamtec DOT com
support AT slamtec DOT com


# Python3 Driver and Viewer

RPLidar Viewer Instructions:

Mouse:
Left Click and Hold - moves (translates) the scan data on the screen
Right Click and Hold - rotates the scan data on the screen (display purposes only, i.e., recorded scan data is unaffected)
Mouse Wheel - forward to zoom in, backwards to zoom out
Double Left Click - re-center the scan data
Double Right Click - re-orientate (rotate) the scan data
Double Middle Click - reset the zoom level

Keyboard:
r key - toogles the faint ray traces on/off within the viewer
[/{ key - increases point size
]/} key - decreases point size
=/+ key - zooms in
-/_ key - zooms out
Up/Down/Left/Right keys - moves the scan data in the respective direction
,/< key - rotates the scan data counter-clockwise
./> key - rotates the scan data clockwise
c key - re-center the scan data
o key - re-orientate (rotate) the scan data
z key - reset the zoom level
i key - re-center and re-orientate and reset the zoom (initializes the default viewer settings)
Esc key - Ends the scanning session and closes the viewer

RPLidar Class Object

Properties of Interest:
COM (pyserial) object - set baud rate, timeout, etc.
Measured rotation rate
Measured number of valid points
Viewer screen size (pygame), always square dimensions
Change colours of pygame objects (points, rays, background, etc.)

Methods of Interest:
constructor (init) - ('port info', baud_rate, timeout, screen_size, draw_rays_at_start, DEBUG_MODE)
connect()
disconnect()
get_device_info()
get_device_health()
get_sample_rate()
start_standard_scan() - 4000 pulses/rec scan rate
start_express_scan() - 8000 pulses/sec scan rate
start_motor_slow() - slowest useable rotation rate
start_motor_14() - 1/4 max rotation rate
start_motor_half() - 1/2 max rotation rate
start_motor_34() - 3/4 max rotation rate
start_motor_max() - fastest/max rotation rate
stop_scan()
reset()
Loading