Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Robotics
  4. ›YDLIDAR X2, X4 Pro, G2, G4, T-mini Plus, T-mini Pro, TG15

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
Short answerWhat the YDLIDAR 360-degree and solid-state LiDAR isYDLIDAR 360-degree and solid-state LiDAR pinoutWiring the YDLIDAR 360-degree and solid-state LiDARExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

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
01

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.

02

YDLIDAR 360-degree and solid-state LiDAR pinout

The pins on the YDLIDAR 360-degree and solid-state LiDAR and what each one does.

PinFunction
5 V, GNDPower
TX, RXUART
M_CTR / M_ENMotor control on some models
USB adapterPower and data
PinFunction
5 V, GND
Power
TX, RX
UART
M_CTR / M_EN
Motor control on some models
USB adapter
Power and data
03

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 pinRaspberry PiPC
USB adapterRaspberry Pi USB portPC USB port
Power5 V, 2 A5 V, 2 A
Softwareydlidar_ros2_driverLidarViewer
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
04

Example code

A minimal sketch to check the part works.

Read scans with the YDLidar-SDK Python wrapper · MicroPython
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()
05

Setup and tuning

Connection

use the USB adapter; on Linux it appears as /dev/ttyUSB0.

SDK

install the YDLIDAR SDK and ROS or ROS 2 driver.

Model setting

set baud rate and model parameters in the launch file.

Mounting

mount level with a clear 360° view.

Power

some models need extra USB power for the motor.

06

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
07

Alternatives and when to choose them

  • ✓RPLIDAR: Slamtec's range.
  • ✓LDRobot and industrial 2D LiDAR: other options.
  • ✓3D LiDAR: full 3D.
08

Common mistakes to avoid

  • !Wrong launch parameters.
  • !Tilted mounting.
  • !Weak USB power.
  • !Blocked view.
09

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

  • YDLIDAR X2 2D LiDAR Sensor 360° Scan 8m Range – USB-C Interface
    ₹6,299View
  • YDLIDAR X4 Pro 360 Degree ROS Scanner for Navigation, Collision Avoidance 10M Range
    ₹8,203View
  • YDLIDAR G2 360° 2D LiDAR Sensor Module with USB Adapter Board
    ₹17,319View
  • YDLIDAR G4 360° 2D LiDAR Sensor – USB Type-C Interface
    ₹31,389View
  • YDLIDAR T-mini Plus LiDAR Sensor – 360° Scanning, 0.12-12m Range, USB Type-C Interface
    ₹9,899View
  • YDLIDAR TMINI PRO 360° TOF Omnidirectional LIDAR Distance Sensor 12M Range UART
    ₹11,599View
  • YDLIDAR TG15 Lidar Sensor – 360-degree Laser Range Scanner (15m) with USB Adapter Board
    ₹41,999View
  • YDLIDAR TG30 360° Laser Range Lidar Scanner 30M – USB Type-C, IP65
    ₹60,369View
  • YDLIDAR TG50 360° 2D UART LiDAR Sensor (Range: 50m) – IP65 Waterproof
    ₹60,899View
  • YDLIDAR TIA 2D Lidar Range Finder (0.05 to 25 m)
    ₹73,100View
  • YDLIDAR TEA Single-Line Scanning LiDAR Sensor – 905nm, IP65, Network Interface
    ₹48,079View
  • YDLIDAR GS2 Linear Array Solid LiDAR Sensor Module – USB Type-C Interface
    ₹5,669View
  • YDLIDAR GS5 Linear Array Solid-State LiDAR Sensor – 85° FOV, 70-1000mm Range, USB Type-C
    ₹4,510View
  • Raspberry Pi 5 16GB RAM Single Board Computer
    ₹36,169View
  • NVIDIA Jetson Orin Nano Super Developer Kit
    ₹54,724View
  • USB to TTL Serial Converter (CH340G / CP2102 / FT232RL / PL2303)
    ₹85View
Shop Infrared, ToF & LiDAR Distance Sensors

Keep learning

Component guideIntermediateSlamtec RPLIDAR A1, A2, A3, S2, S2E, S3 360-Degree LiDARRPLIDAR sensors spin a laser to measure distances all around, producing a 2D map slice many times a second.4 min read · RoboticsComponent guideIntermediateLDRobot STL27L, D100, D200, Orbbec SL450 PulsarThese 360 or 270 degree 2D LiDARs cover low-cost to industrial robots.3 min read · RoboticsComparisonIntermediateLiDAR Distance SensorsCompare LiDAR distance sensors: single-point TFmini and TF-Luna, 2D scanners for SLAM and 3D LiDAR. Range, interfaces, sunlight limits and Arduino code.3 min read · SensorsComponent guideAdvanced3D LiDAR Sensors3D LiDARs scan many laser lines at once to build a point cloud of everything around them.6 min read · Robotics

Sources

  • YDLIDAR datasheets and YDLidar-SDK

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the YDLIDAR 360-degree and solid-state LiDAR isYDLIDAR 360-degree and solid-state LiDAR pinoutWiring the YDLIDAR 360-degree and solid-state LiDARExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide8 items · ₹1,87,076

YDLIDAR X2 2D LiDAR Sensor 360° Scan 8m Range – USB-C Interface · YDLIDAR X4 Pro 360 Degree ROS Scanner for Navigation, Collision Avoidance 10M Range · YDLIDAR G2 360° 2D LiDAR Sensor Module with USB Adapter Board · YDLIDAR G4 360° 2D LiDAR Sensor – USB Type-C Interface · YDLIDAR T-mini Plus LiDAR Sensor – 360° Scanning, 0.12-12m Range, USB Type-C Interface · YDLIDAR TMINI PRO 360° TOF Omnidirectional LIDAR Distance Sensor 12M Range UART · YDLIDAR TG15 Lidar Sensor – 360-degree Laser Range Scanner (15m) with USB Adapter Board · YDLIDAR TG30 360° Laser Range Lidar Scanner 30M – USB Type-C, IP65

Run itChange the inputs and watch the output

One line per full turn: the number of points in that scan.

Shell
716 points

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question