How to setup a XV-11 Lidar with the Raspberry Pi.
Use Cases include obstacle avoidance and autonomous navigation for various robotic projects.
Step 1: Parts
Gather the required parts:
RPI 3 - https://amzn.to/2VA9pQY
4 Amp Power Adapter - https://amzn.to/2CTptWu
Breadboard - https://amzn.to/2H1ekHs
Breadboard Power Supply - https://amzn.to/2AvjKon
120 pcs jumper cable: https://ebay.to/2VAb9cY
Lidar mount - http://www.thingiverse.com/thing:1707495
Lidar Controller - https://www.getsurreal.com/shop?v=47e5dceea252
XV-11 Lidar - https://ebay.to/2yCIF8G
Step 2: Physical Setup
1. Mount XV-11 to 3D printed mount
2. Route serial data cables and Motor power cables accordingly
3.Plug Male to Male jumper cables to motor power connector and 3.3v breadboard rails
4.Plug serial harness into xv-11 lidar controller 1.2 teensy breakout board
5.Plug mini-usb cable into teensyusb and usb cable into computer
Step 3: Testing
1. Download and install Arduino IDE 1.0.6
2. Download and install teensyarduino
3. Open Arduino IDE, click tools tab and select "teensy 2.0", and "serial" option
4. Your IDE should detect the teensy board, go ahead and click "serial monitor" in tools tab
5. Bottom right select "newline" in drop-down and set baud rate to 115200
6. Send "ShowDist" to display distance data or "ShowRPM" for RPM information
Step 4: Raspberry Pi Setup
1. Unplug usb cable from PC and plug into empty USB-Slot on Raspberry Pi
2. Run "lsusb" in terminal and verify that "Informatic Teensyduino Serial" is present
3. Run "dmesg | grep tty" in terminal and verify you see something similar to "ttyACM0: USB ACM device" and take note of "ttyACM0" (yours may be different)
4. Download lidar script from get surreal page https://www.getsurreal.com/products/xv-lidar-contr...
5. Edit com_port = "/dev/ttyACM0" and set baudrate = 115200
6. Upload script to Raspberry Pi
7. run "pip install pyserial"
8. run "sudo apt-get install visual-python"
Step 5: Run Script
1. Run Lidar Script
2. Right click window to rotate screen to present entire point map
3. Congratulations, your have just implemented a budget lidar system!!
Step 6: Additional Resources
Arduino IDE: https://www.arduino.cc/en/Main/OldSoftwareRelease...
Surreal Tests/Scripts: https://www.arduino.cc/en/Main/OldSoftwareRelease...