Lidar
The Studica Lidar is a 360˚ 2D LiDAR. The lidar rotates 360˚ to continuosly output the angle and distance of a scanning environment.
Important
The Laser on the lidar is class 1.
Lidar Specifications (Click to Open)
Item |
Min |
Typical |
Max |
Unit |
Remark |
|---|---|---|---|---|---|
Ranging Frequency |
/ |
3000 |
/ |
Hz |
Ranging 3000 times per second |
Motor Frequency |
5 |
6 |
8 |
Hz |
Need to connect to PWM signal, recommended to use the speed of 6Hz |
Ranging Distance |
0.12 |
/ |
8 |
m |
Indoor Environment with 80% reflectivity |
Field of View |
/ |
0-360 |
/ |
Deg |
/ |
Systematic Error |
/ |
2 |
/ |
cm |
Range ≤ 1m |
Relative Error |
/ |
3.5 |
/ |
% |
1m ≤ Range ≤ 6m |
Tilt angle |
0.25 |
1 |
1.75 |
Deg |
/ |
Angle Resolution |
0.6 @ 5Hz |
0.72 @ 6Hz |
0.96 @ 8Hz |
Deg |
Different per motor Frequency |
Supply Voltage |
4.8 |
5 |
5.2 |
V |
Excessive voltage might damage the lidar |
Supply Current |
1000 |
/ |
/ |
mA |
Instantaneous peak current at start-up |
Working Current |
/ |
300 |
500 |
mA |
Lidar when activly scanning |
Laser Wavelength |
775 |
793 |
800 |
nm |
Infrared band |
Operating Temperature |
0 |
20 |
40 |
℃ |
No condensation |
Storage Temperature |
-10 |
/ |
60 |
℃ |
With package |
Lighting Environment |
0 |
550 |
2000 |
Lux |
For reference only |
Weight |
/ |
126 |
/ |
g |
N.W. |
Polar Coordinate System Definition
The lidar defines a polar coordinate system. The center of the rotating core is taken as the pole and the specified angle is positive clockwise. The zero angle is located directly in front of the motor. With tolerances there is a ±3˚ deviation.
Programming
Using ROS or ROS2:
There is a driver that can be installed and used:
Using WPILib:
Full example can be viewed on the example github here
1//Lidar Library
2private Lidar lidar;
3
4//Lidar Scan Data Storage class
5private Lidar.ScanData scanData;
6
7/**
8 * Top USB 2.0 port of VMX = kUSB1
9 * Bottom USB 2.0 port of VMX = kUSB2
10 */
11lidar = new Lidar(Lidar.Port.kUSB1); //Lidar will start spinning the moment this is called
12
13//Call that will start the lidar if stopped
14lidar.start();
15
16//Call that will stop the lidar if needed.
17lidar.stop();
18
19//Call to get data from lidar.
20scanData = lidar.getData();
21
22//Output Lidar data at 60 degrees
23System.out.println("Angle: " + scanData.angle[60] +"˚, Distance: " + scanData.distance[60] + "mm");
Full example can be viewed on the example github here
Header
1//Lidar Library
2#include "studica/Lidar.h"
3
4/**
5 * kUSB1 = Top USB 2.0 port of VMX
6 * kUSB2 = Bottom USB 2.0 port of VMX
7 */
8studica::Lidar lidar{studica::Lidar::Port::kUSB1}; //Lidar will start spinning the moment this is called
9
10// Scan data struct
11studica::Lidar::ScanData scanData;
Source
1//Call that will start the lidar if stopped
2lidar.Start();
3
4//Call that will stop the lidar if needed.
5lidar.Stop();
6
7//Call to get data from lidar.
8scanData = lidar.GetData();
9
10//Output Lidar Data at 60 degrees
11cout << "Angle: " << scanData.Angle[60] << "˚, Distance: " << scanData.Distance[60] << "mm" << endl;