Component guide · Intermediate · 4 min read
YDLIDAR X2, X4 Pro, G2, G4, T-mini Plus, T-mini Pro, TG15, TG30, TG50, TIA

TEA 2D LiDAR and GS2 / GS5 Solid-State
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
YDLIDAR sensors are 360-degree scanning LiDARs used in robot vacuums, delivery robots and ROS projects. The X2 and X4 Pro are low-cost triangulation starters (8 to 10 m), the G2 and G4 are faster, the T-mini Plus and Pro use ToF for 12 m, and the TG15, TG30 and TG50 are IP65 outdoor ToF units. The GS2 and GS5 are small fixed solid-state sensors for edge and cliff detection.
Key specs at a glance
- Range
- 8 m (X2) to 50 m (TG50); 0.07 to 1 m (GS5)
- Sample rate
- 3,000 (X2) to 20,000 (TG series) points per second
- Principle
- Triangulation (X, G) or ToF (T-mini, TG, TIA, TEA)
- Interface
- UART via USB adapter, Ethernet on TEA
- Supply
- 5 V (most), 12 to 24 V (TEA)
- Software
- YDLidar-SDK, ROS / ROS 2 driver
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1YDLIDAR X2 2D LiDAR Sensor 360° Scan 8m Range – USB-C Interface₹6,299
Option 2YDLIDAR X4 Pro 360 Degree ROS Scanner for Navigation, Collision Avoidance 10M Range₹8,203
Option 3YDLIDAR G2 360° 2D LiDAR Sensor Module with USB Adapter Board₹17,319
Option 4YDLIDAR G4 360° 2D LiDAR Sensor – USB Type-C Interface₹31,389
Option 5YDLIDAR T-mini Plus LiDAR Sensor – 360° Scanning, 0.12-12m Range, USB Type-C Interface₹9,899
Option 6YDLIDAR TMINI PRO 360° TOF Omnidirectional LIDAR Distance Sensor 12M Range UART₹11,599
What the YDLIDAR 360-degree and solid-state LiDAR is
YDLIDAR 360° LiDARs, such as the X2, X4 and G4, are rotating laser scanners for robot mapping, SLAM and obstacle avoidance, with ROS drivers.
Triangulation LiDARs are accurate at short range but lose accuracy far away and in sunlight. ToF models (T-mini, TG, TIA) work outdoors and further.
Each model has its own baud rate and sample rate parameters; set them in the ROS 2 launch file.
YDLIDAR 360-degree and solid-state LiDAR pinout
The pins on the YDLIDAR 360-degree and solid-state LiDAR and what each one does.
| Pin | Function |
|---|---|
| 5 V, GND | Power |
| TX, RX | UART |
| M_CTR / M_EN | Motor control on some models |
| USB adapter | Power and data |
- 5 V, GND
- Power
- TX, RX
- UART
- M_CTR / M_EN
- Motor control on some models
- USB adapter
- Power and data
Wiring the YDLIDAR 360-degree and solid-state LiDAR
Connect the YDLIDAR 360-degree and solid-state LiDAR like this.
| YDLIDAR 360-degree and solid-state LiDAR pin | Raspberry Pi | PC |
|---|---|---|
| USB adapter | Raspberry Pi USB port | PC USB port |
| Power | 5 V, 2 A | 5 V, 2 A |
| Software | ydlidar_ros2_driver | LidarViewer |
- USB adapter
- Raspberry Pi:
- Raspberry Pi USB port
- PC:
- PC USB port
- Power
- Raspberry Pi:
- 5 V, 2 A
- PC:
- 5 V, 2 A
- Software
- Raspberry Pi:
- ydlidar_ros2_driver
- PC:
- LidarViewer
Example code
A minimal sketch to check the part works.
import ydlidar
laser = ydlidar.CYdLidar()
laser.setlidaropt(ydlidar.LidarPropSerialPort, "/dev/ttyUSB0")
laser.setlidaropt(ydlidar.LidarPropSerialBaudrate, 230400) # per model, X2 is 115200
laser.setlidaropt(ydlidar.LidarPropLidarType, ydlidar.TYPE_TRIANGLE)
laser.setlidaropt(ydlidar.LidarPropSingleChannel, True) # X2, X4 Pro single channel
if laser.initialize() and laser.turnOn():
scan = ydlidar.LaserScan()
while laser.doProcessSimple(scan):
print(len(scan.points), "points")
laser.turnOff(); laser.disconnecting()Setup and tuning
use the USB adapter; on Linux it appears as /dev/ttyUSB0.
install the YDLIDAR SDK and ROS or ROS 2 driver.
set baud rate and model parameters in the launch file.
mount level with a clear 360° view.
some models need extra USB power for the motor.
What you need
Shop this list16 of 16 found in our store · ₹4,70,311
YDLIDAR X2 2D LiDAR Sensor 360° Scan 8m Range – USB-C Interface: the part this guide coversYDLIDAR X2 2D LiDAR Sensor 360° Scan 8m Range – USB-C Interface₹6,299
YDLIDAR X4 Pro 360 Degree ROS Scanner for Navigation, Collision Avoidance 10M Range: another version this guide coversYDLIDAR X4 Pro 360 Degree ROS Scanner for Navigation, Collision Avoidance 10M Range₹8,203
YDLIDAR G2 360° 2D LiDAR Sensor Module with USB Adapter Board: another version this guide coversYDLIDAR G2 360° 2D LiDAR Sensor Module with USB Adapter Board₹17,319
YDLIDAR G4 360° 2D LiDAR Sensor – USB Type-C Interface: another version this guide coversYDLIDAR G4 360° 2D LiDAR Sensor – USB Type-C Interface₹31,389
YDLIDAR T-mini Plus LiDAR Sensor – 360° Scanning, 0.12-12m Range, USB Type-C Interface: another version this guide coversYDLIDAR T-mini Plus LiDAR Sensor – 360° Scanning, 0.12-12m Range, USB Type-C Interface₹9,899
YDLIDAR TMINI PRO 360° TOF Omnidirectional LIDAR Distance Sensor 12M Range UART: another version this guide coversYDLIDAR TMINI PRO 360° TOF Omnidirectional LIDAR Distance Sensor 12M Range UART₹11,599
YDLIDAR TG15 Lidar Sensor – 360-degree Laser Range Scanner (15m) with USB Adapter Board: another version this guide coversYDLIDAR TG15 Lidar Sensor – 360-degree Laser Range Scanner (15m) with USB Adapter Board₹41,999
YDLIDAR TG30 360° Laser Range Lidar Scanner 30M – USB Type-C, IP65: another version this guide coversYDLIDAR TG30 360° Laser Range Lidar Scanner 30M – USB Type-C, IP65₹60,369
YDLIDAR TG50 360° 2D UART LiDAR Sensor (Range: 50m) – IP65 Waterproof: another version this guide coversYDLIDAR TG50 360° 2D UART LiDAR Sensor (Range: 50m) – IP65 Waterproof₹60,899
YDLIDAR TIA 2D Lidar Range Finder (0.05 to 25 m): another version this guide coversYDLIDAR TIA 2D Lidar Range Finder (0.05 to 25 m)₹73,100
YDLIDAR TEA Single-Line Scanning LiDAR Sensor – 905nm, IP65, Network Interface: another version this guide coversYDLIDAR TEA Single-Line Scanning LiDAR Sensor – 905nm, IP65, Network Interface₹48,079
YDLIDAR GS2 Linear Array Solid LiDAR Sensor Module – USB Type-C Interface: another version this guide coversYDLIDAR GS2 Linear Array Solid LiDAR Sensor Module – USB Type-C Interface₹5,669
YDLIDAR GS5 Linear Array Solid-State LiDAR Sensor – 85° FOV, 70-1000mm Range, USB Type-C: another version this guide coversYDLIDAR GS5 Linear Array Solid-State LiDAR Sensor – 85° FOV, 70-1000mm Range, USB Type-C₹4,510
Raspberry Pi 5 single board computer: to run ROS or Python for scanning LiDARRaspberry Pi 5 16GB RAM Single Board Computer₹36,169Closest match, check the specs
NVIDIA Jetson Orin Nano Super developer kit: to process point clouds and depthNVIDIA Jetson Orin Nano Super Developer Kit₹54,724
USB to TTL serial converter: to talk to the module from a PCUSB to TTL Serial Converter (CH340G / CP2102 / FT232RL / PL2303)₹85Closest match, check the specs
Alternatives and when to choose them
- RPLIDAR: Slamtec's range.
- LDRobot and industrial 2D LiDAR: other options.
- 3D LiDAR: full 3D.
Common mistakes to avoid
- Wrong launch parameters.
- Tilted mounting.
- Weak USB power.
- Blocked view.
Frequently asked questions
How do I use YDLIDAR with ROS 2?
Install ydlidar_ros2_driver and launch the file for your model.
Why does the LiDAR spin but not publish?
The baud rate or model parameters in the launch file are wrong.
Which model suits small robots?
The X2 or X4 suit small indoor robots and learning projects.
Why is the scan noisy?
Reflections from glass or shiny surfaces, or a tilted mount.
Does it need extra power?
Some models need a second USB port for the motor.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.
