YDLIDAR G4 Lidar Development Kit User Manual

June 16, 2024
YDLIDAR

YDLIDAR-logo

YDLIDAR G4 Lidar Development Kit

YDLIDAR-G4-Lidar-Development-Kit-product-image

Specifications

YDLIDAR G4 LIDAR DEVELOPMENT KIT
The development kit of YDLIDAR G4 lidar (hereinafter referred to as G4) is an accessory tool provided for performance evaluation and early development of the G4. Through the G4 development kit, and with the evaluation software, users can observe point cloud data scanned by G4 on your environment or development on the SDK.

Development Kit
The G4 development kit includes the following components:

  • G4 Lidar
  • USB Type-C Cable
  • USB Adapter Board

USAGE UNDER WINDOWS

Device Connection
When using G4 under Windows, follow the steps below to connect G4 and PC:

  1. 1.  **Connect the adapter board with G4.**  

  2. Connect the USB cable to the USB port of the adapter board and the PC. Make sure the Type-C interface of the USB cable is connected to the USB_DATA of the USB interface board.

Driver Installation
To use G4 under Windows, you need to install the driver. Please refer to the driver installation guide provided by the manufacturer for detailed instructions.

Evaluation Software Usage
The evaluation software allows you to observe point cloud data scanned by G4 and perform development on the SDK. Please refer to the evaluation software user manual for detailed instructions on how to use the software.

CAUTION

  1. Ambient Temperature
    It is important to operate G4 within the specified ambient temperature range provided by the manufacturer. Operating outside this range may affect the performance and lifespan of the device.

  2. Ambient Lighting
    Avoid exposing G4 to extreme lighting conditions, such as direct sunlight or strong artificial light sources, as it may affect the accuracy of the scanning results.

  3. Power Supply
    Ensure that G4 is powered using a stable power supply according to the manufacturer’s specifications. Using an unstable or incorrect power supply may damage the device.

FAQ

  1. Q: What is the purpose of the G4 development kit?
    A: The G4 development kit is provided for performance evaluation and early development of the G4 lidar. It allows users to observe point cloud data scanned by G4 and perform development on the SDK

  2. Q: What components are included in the G4 development kit?
    A: The G4 development kit includes the G4 Lidar, USB Type-C Cable, and USB Adapter Board.

  3. Q: How do I connect G4 to my PC under Windows?
    A: Connect the adapter board with G4 first, then connect the USB cable to the USB port of the adapter board and the PC. Make sure the Type-C interface of the USB cable is connected to the USB_DATA of the USB interface board.

  4. Q: Is there any caution regarding the ambient temperature for operating G4?
    A: Yes, it is important to operate G4 within the specified ambient temperature range provided by the manufacturer to ensure optimal performance and lifespan of the device.

www.ydlidar.com

  • Shenzhen EAI Technology Co.,Ltd.
  • Copyright 2017 EAI All Rights Reserved

YDLIDAR G4 LIDAR DEVELOPMENT KIT

The development kit of YDLIDAR G4 lidar (hereinafter referred to as G4) is an accessory tool provided for performance evaluation and early development of the G4. Through the G4 development kit, and with the evaluation software, users can observe point cloud data scanned by G4 on your environment or development on the SDK.

Development Kit
The G4 development kit has the following components: YDLIDAR-G4-Lidar-
Development-Kit-01 \(1\) FIG 1 YDLIDAR G4 DEVELOPMENT KIT

CHART 1 YDLIDAR G4 LIDAR DEVELOPMENT KIT DESCRIPTION

Item Qty. Description
G4 Lidar 1 Standard version of the G4 Lidar, with internal integrated motor

drive, which can realize motor stall control and motor control
USB Type-C Cable| 1| Use with USB adapter board to connect G4 and PC. USB cable is both a power supply cable and a data cable
USB Adapter Board| 1| Realize USB to UART, convenient for G4 and PC to quickly interconnect. Meanwhile, it supports serial port DTR signal to control G4 motor rotation and stop. In addition, a Micro USB power interface (PWR) for auxiliary power supply is provided

  • Note: USB Adapter board has two USB TYPE C interface: USB_DATA、USB_PWR.
  • USB_DATA: Data powered interface. In most cases, this interface can be used to meet power and communication requirements.
  • USB_PWR: Auxiliary power supply interface. The USB interface of some development platforms has weak current drive capability. At this time, auxiliary power supply can be used.

USAGE UNDER WINDOWS

Device Connection
When G4 is evaluated and developed under windows, G4 and PC need to be interconnected. The specific process is as follows:

YDLIDAR-G4-Lidar-Development-Kit-01 \(2\)

YDLIDAR-G4-Lidar-Development-Kit-01 \(3\)

  • Connect the adapter board with G4 first, then connect the USB cable to the USB port of the adapter board and the PC. Note that the Type-C interface of the USB cable is connected to the USB_DATA of the USB interface board, and the idle mode is used after G4 is powered on. The motor does not rotate.
  • The drive current of USB interface of some development platforms or PC is not sufficient. G4 need to be connected to the auxiliary power supply of +5V, otherwise the lidar will be abnormal. YDLIDAR-G4-Lidar-Development-Kit-01 \(4\)

Driver Installation

  • To evaluate and develop the G4 under Windows, you need to install the serial port driver of the USB adapter board. The USB adapter board of this kit adopts CP2102 chip to realize serial port
  • (UART) to USB signal conversion. Its driver can be downloaded from our official website or downloaded from the official website of Silicon Labs.
  • After decompressing the driver package, run the CP2102’s Windows driver installation file (exe file under CP210x_VCP_Windows). Please select the 32-bit version (x86) or 64-bit version (x64) installation program according to the version of the windows operating system. YDLIDAR-G4-Lidar-Development-Kit-01 \(5\)
  • Double-click the exe file and follow the prompts to install it. YDLIDAR-G4-Lidar-Development-Kit-01 \(6\)
  • After the installation is complete, you can right-click on [My Computer] and select [Properties]. On the open [System] screen, select [Device Manager] from the left menu to access the [Device Manager].
  • Expand [Port] to see the serial port name corresponding to the identified USB adapter, that is, the driver installation is successful. The following figure shows COM3. (Note that the port must be checked in case of G4 and PC interconnection). YDLIDAR-G4-Lidar-Development-Kit-01 \(7\)

Evaluation Software Usage

  • YDLIDAR provides G4 real-time scanning point cloud data visualization software LidarViewer. Using this software, users can intuitively observe the scanning effect of G4. YDLIDAR provides G4 real-time point cloud data and real-time scanning frequency. At the same time, G4 version information can be read, and the scanned data can be saved offline to an external file for further analysis. Visualization software download link:
    https://www.ydlidar.com/Public/upload/download/TOOL.zip

  • Before using the YDLIDAR software, make sure that the G4 USB adapter board serial port driver is installed successfully, and interconnect the G4 with the USB port of the PC. Run the evaluation software: LidarViewer.exe, select the corresponding serial port number and model number. Meanwhile, users could choose language on the top right corner.

  • If the connection is correct, you will see the following screen: YDLIDAR-G4-Lidar-Development-Kit-01 \(9\)

Start Scanning
Click to start scanning and display the environment point cloud, the upper left corner  displays the angle & distance information of the red line position (unit: mm). Click to stop it, as shown below: YDLIDAR-G4-Lidar-
Development-Kit-01 \(12\)Data Storage
During lidar scanning, click [File] in the main menu, select [Export to Excel], and save point cloud data according to the prompts. Then the system will save the point cloud information scanned in a circle in Excel format.

Scan Frequency
is used to adjust the scanning frequency (motor speed) of the lidar. Click this control, the system will pop up a frequency setting bar, which can be automatically adjusted according to requirements. When the lidar is in the scan state, you need to click the scan control again after adjusting the scan frequency. The speed can be adjusted by dragging the control, the control of scanning frequency is shown in the figure below:

Display Mean and Standard Deviation

  • Click [Tools] in the main menu, then select [Mean And STD] – [View]. YDLIDAR-G4-Lidar-Development-Kit-01 \(16\)
  • Choose one according to your needs, move the mouse to the test position, right-click the pop-up menu, and select [Lock Mouse Tracking]. YDLIDAR-G4-Lidar-Development-Kit-01 \(17\)

Play and Record
Click [Tools] in the main menu, then select [Record and Play].

  • The main window is displayed as follows:
    • To record lidar data, click to start recording, and click  to stop recording.
    • In non-scanning mode, click to start play.

The play process is as follows: YDLIDAR-G4-Lidar-Development-Kit-01
\(22\)Debug
Click [Tools] in the main menu, and then select [DebugON] to output the raw lidar data to the “viewer_log.txt” and “viewer_log_err.txt” files.

Filter

  • Click [Tools] in the main menu, and then select [Filter] to add Lidar data filtering algorithm. YDLIDAR-G4-Lidar-Development-Kit-01 \(24\)
  • Note: For more functions of LidarViewer, please click [Help], select [More Information], and learn more about how to use it.

LINUX ROS OPERATION

There are many Linux versions, this article only uses Ubuntu 18.04, Melodic version ROS as an example.

  1. Device Connection
    Under Linux, the G4 and PC interconnect processes are consistent with those under Windows. See Device Connection under Window.

  2. Compile and Install YDlidar-SDK
    YDLIDAR_ROS_DRIVER depends on the YDLIDAR-SDK library. If you have never installed the ydlidar-SDK library, or it has expired, you must first install the YDlidar-SDK library. If you have the latest version of ydlidar-SDK installed, please skip this step, then go to the next step. YDLIDAR-G4
-Lidar-Development-Kit-01 \(25\)

  3. ROS Driver Installation

  4. Cloning GitHub’s YDlidar ROS Driver Package:YDLIDAR-G4-Lidar-Development-Kit-01 \(26\)

  5. Build the ydlidar_ros_driver software package:YDLIDAR-G4-Lidar-Development-Kit-01 \(27\)

  6. Package environment Settings:YDLIDAR-G4-Lidar-Development-Kit-01 \(28\) Note: Add permanent workspace environment variables. It will be very convenient if ROS environment variables are automatically added to your bash session every time you start a new shell: YDLIDAR-G4-Lidar-Development-Kit-01 \(29\)

  7. Verify that your package path is set, echo the ROS_PACKAGE_PATH variable.YDLIDAR-G4-Lidar-Development-Kit-01 \(30\) You should see something like this: /home/tony/ydlidar_ws/src:/opt/ros/melodic/share

  8. Create Serial Port Alias [Optional]YDLIDAR-G4-Lidar-Development-Kit-01 \(31\) Note: After completing the previous operation, re-insert the LiDAR again.

  9. Run the ydlidar_ros_driver
    Run ydlidar_ros_driver with startup file, as shown below: YDLIDAR-G4-Lidar-
Development-Kit-01 \(32\)

  10. RVIZ View Scan Results
    Run the launch file and open rviz to view the G4 scan results, as shown in the figure below: YDLIDAR-G4-Lidar-Development-Kit-01
\(33\) YDLIDAR-G4-Lidar-Development-Kit-01
\(34\)

  11. Modify Scan Angle
    The scanning data seen by running the launch file is displayed by default with 360- degree data. To modify the display range, you need to modify the configuration parameters in the launch file. The specific operation is as follows:

  12. Switch to the directory where the corresponding [launch file] is located, edit the file, and its content is as shown in the figure:YDLIDAR-G4-Lidar-Development-Kit-01 \(35\) Note: For more information about the file contents, please refer to
    https://github.com/YDLIDAR/ydlidar_ros_driver#configure-ydlidar_ros_driver- internal-parameter

  13. The G4 lidar coordinates follow the right-hand rule within ROS, with an angle range of [-180, 180]. “angle_min” is the start angle, and “angle_max” is the endangle. The specific scope needs to be modified according to actual use.

CAUTION

  1. Ambient Temperature
    When the working environment temperature of G4 is too high or too low, it will affect the accuracy of the distance measuring system. It may also damage the structure of the scanning system and reduce the life of the G4 lidar. Avoid use in high temperature (>50 degrees Celsius) and low temperature (<0 degrees Celsius) conditions.

  2. Ambient Lighting

  3. The ideal working environment of G4 is indoor, and the indoor environment light (including no light) will not affect the work of G4. However, please avoid using strong light sources (such as high-power lasers) to directly illuminate the G4’s vision system.

  4. If you need to use it outdoors, please avoid the G4’s vision system directly facing the sun, which may cause permanent damage to the vision system’s photosensitive chip, which will invalidate the range finding.

  5. The G4 standard version will cause interference in the distance measurement under the conditions of outdoor strong sunlight reflection, please pay attention to it.

  6. Power Supply
    During the development process, since the drive current of the USB interface of each platform or the USB interface of the computer may be too low to drive the G4, the external power supply of the +5V to the G4 needs to be provided through the USB_PWR interface of the USB interface board. It is not recommended to use mobile phone power bank because the voltage ripple of power bank is too large.

REVISE

Date Version Content
2017-12-05 1.0 Composing a first draft
2018-01-22 1.1 Added auxiliary power connection, document description,

configuration description, and power supply requirements
2018-04-03| 1.2| Adapt to PointCloudViewer2.0 client
2021-08-02| 1.3| Adapt LidarViewer client, update SDK and ROS tutorial

Copyright 2017 EAI All Rights Reserved

Documents / Resources

| YDLIDAR G4 Lidar Development Kit [pdf] User Manual
G4 Lidar Development Kit, G4, Lidar Development Kit, Development Kit, Kit
---|---

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

YDLIDAR User Manuals

Related Manuals