RPLidar Robopeak error

"Good morning, I am encountering many issues installing the library found at this link GitHub - robopeak/rplidar_arduino: RoboPeak RPLIDAR driver for Arduino and Arduino-compatible devices for a project with a lidar. I'm unable to install the library on my IDE 2.3.2 in any way. I've tried both with the zip file and manually from the Documents\Arduino\libraries folder but nothing seems to work. Do you have any advice? Is it a library with problems?"

Hi @granati83. As you discovered, unfortunately the author of the "RPLidarDriver" library used a non-standard repository configuration that makes it impossible to install using Arduino IDE's "Add .ZIP Library..." feature. So in this case it is necessary to do a manual installation.

I'll provide instructions you can follow to do that:

  1. Select File > Preferences... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Take note of the path shown in the "Sketchbook location" field of the dialog.
  3. Click the "CANCEL" button.
    The "Preferences" dialog will close.
  4. Click the following link to open the library's GitHub repository homepage in your web browser:
    https://github.com/robopeak/rplidar_arduino
  5. Click the "Code ▾" button you see on that page.
  6. Select Download ZIP from the menu.
    A download of the ZIP file of the library will start.
  7. Wait for the download to finish.
  8. Extract the downloaded file.
  9. Copy the RPLidarDriver folder from the extracted folder to the libraries subfolder of the path you saw in the "Sketchbook location" preference.
    The folder structure of the installation must look like this:
    <Sketchbook location>/
    ├── libraries/
    │   ├── RPLidarDriver/
    │   │   ├── RPLidar.h
    │   │   ...
    │   ...
    ...
    
    (where <Sketchbook location> is the path from the Sketchbook location" preference)
  10. Select File > Quit (or Arduino IDE > Quit Arduino IDE for macOS users) from the Arduino IDE menus.
    All Arduino IDE windows will close.
  11. Start Arduino IDE.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.