So you just received your Lidar controller, but you don’t have a robot ready to throw it into just yet?
Here’s a basic setup to get things validated.
- Install the Arduino IDE
- Install the teensyduino add-on for Arduino.
- Plug up the Lidar to the controller board
- Connect the USB from your computer to the controller
- Your Lidar should begin spinning at this point
- From the Arduino IDE,
- Set the Board to Teensy 2.0
- Set the serial port to the port that appears after you plugin to the Teensy
- Open the Serial Monitor
- At the bottom window of the Serial Monitor change the settings to “NewLine” and “115200 baud”
- The Serial monitor should be displaying lots of garbled data*
- Type RelayOff and click “Send” – This will stop all the garbled data
- Type ShowRPM and click “Send” – Streaming RPM data should now start with values close to 300
- That’s it for a basic test. You can explore the rest of the commands available, but I don’t recommend saving the config at this time. That way when you unplug and plug back in all the default settings will still be enabled. However, if you do save a new config you can always reset it back to the defaults with ResetConfig
*Garbled Data – The data streaming from the XV Lidar is not in a human readable format. The data must be parsed to read the distance data. The python program in the Visual Test has code that parses the lidar data stream and can be used as an example for your own code.