/rplidar

Rplidar modular component and stand-alone grpc server

Primary LanguageGoApache License 2.0Apache-2.0

rplidar

This repo integrates slamtec rplidar LIDARS within Viam's RDK.

It has been tested on the following rplidars:

Getting started

  1. Install the rplidar module:
    • OSx:
      brew tap viamrobotics/brews && brew install rplidar-module
    • Linux AArch64 (ARM64) (e.g., on an RPI):
      sudo curl -o /usr/local/bin/rplidar-module http://packages.viam.com/apps/rplidar/rplidar-module-latest-aarch64.AppImage
      sudo chmod a+rx /usr/local/bin/rplidar-module
    • Linux x86_64:
      sudo curl -o /usr/local/bin/rplidar-module http://packages.viam.com/apps/rplidar/rplidar-module-latest-x86_64.AppImage
      sudo chmod a+rx /usr/local/bin/rplidar-module
  2. Run the RDK web server using one of the example config files modules/sample_osx.json or modules/sample_linux.json, depending on your operating system.

Development

Run make install-swig.

Run rplidar as a modular component

  1. Build the module: make build-module
  2. Run the RDK web server using one of the example config files modules/sample_osx.json or modules/sample_linux.json, depending on your operating system.

Run rplidar as a standalone server/client

RPI (Debian)

  • Server: go run cmd/server/main.go
  • Client: go run cmd/client/main.go
  • Script that saves PCD files: go run cmd/savepcdfiles/main.go -datafolder my_data

macOS

  1. Find the device path name by following these instructions
    • NOTE: It will likely be this path: /dev/tty.SLAB_USBtoUART
  2. Server: go run cmd/server/main.go -device /dev/tty.SLAB_USBtoUART
  3. Client: go run cmd/client/main.go -device /dev/tty.SLAB_USBtoUART
  4. Script that saves PCD files: go run cmd/savepcdfiles/main.go -device /dev/tty.SLAB_USBtoUART -datafolder my_data

Linting

make lint