Lidar Scans and Recordings - SmartAsphalt159/smart_asphalt GitHub Wiki

Overview

This article will go over what's necessary to record and log data collected from the LIDAR, for later analysis and playback.

Prerequisites/Requirements

  • FFmpeg
  • matplotlib
  • numpy

How To Record LIDAR Data of The System

Currently what is recorded, to create the playbacks, is stored in a CSV file with 4 columns that are titled Time Added (The time the reading was taken), Angle (The angle measurement that was taken in Degrees), Strength (intensity which ranges from 0 (low) to 15 (high)), Distance (In millimeters of object pinged). CSV files is generated and deposited in the src directory, if it is desired to be stored in another location that must be change manually within the DataLogger class.

In the Lidar.py class their is a call to the DataLogger class where we call on occasion to write into the logs what was recorded into the lidar, currently after every 100 samples we record a scan. From there within the Lidar_Scanning_Recording directory there are a couple files that were used for testing and reading files, animate_scan.py has the basic layout and ability to read a csv file and then record it into a *.mp4 file for later use. An important note is that FFmpeg must be installed on the target machine to be able to create the mp4 video. Here is a useful link for setting that up on a windows machine FFmpeg Installation.

Also not their is example data within the Lidar_Scanning_Recording directory to play with and become familiar with the post video generation.