X4PRO Lidar drive for despin control and motor control. USB Type-C Use with USB adapter board to connect X4PRO and PC. USB cable is both a Cable power supply cable and a data cable. Realize the function of USB to UART, which is convenient for the fast USB Adapter interconnection between X4PRO and PC.
Page 4
FIG 3 YDLIDAR X4PRO DEVICE CONNECTION STEP 2 Connect the adapter board with X4PRO 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 adapter board.
2.2 Driver Installation To evaluate and develop the X4PRO under Windows, the serial port driver of the USB adapter board needed to be installed. 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.
Before using the YDLIDAR software, make sure that the X4PRO USB adapter board serial port driver is installed successfully, and interconnect the X4PRO with the USB port of the PC. Run the evaluation software: LidarViewer.exe, select the corresponding serial port number and model number.
If the connection is correct, it will show the following screen: FIG 9 POINTCLOUD VIEWER INTERFACE 2.3.1 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.
2.3.3 Display Mean and Standard Deviation Click [Tools] in the main menu, then select [Mean And STD] - [View]. FIG 12 YDLIDAR G4 DISPLAY MEAN AND STANDARD DEVIATION Choose one according to needs, move the mouse to the test position, right-click the pop-up menu, and select [Lock Mouse Tracking].
FIG 14 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: FIG 15 PLAY PROCESS 2.3.5 Debug Click [Tools] in the main menu, and then select [DebugON] to output the raw lidar data to the "viewer_log.txt"...
YDLIDAR_ROS_DRIVER depends on the YDLIDAR-SDK library. If never installed the YDlidar-SDK library before, or it has expired, it is necessary to install the YDlidar-SDK library. If the system has installed the latest version of ydlidar-SDK, please skip this step, then go to the next step.
$ roslaunch ydlidar_ros_driver X4.launch 3.5 RVIZ View Scan Results Run the launch file and open rviz to view the X4PRO scan results, as shown in the figure below: $ roslaunch ydlidar_ros_driver lidar_view.launch Note: Take G4 as an example by default, if use other types of lidar, need to change lidar.launch in lidar_view.launch file to the corresponding **.launch file.
Page 13
Note: For more information about the file contents, please refer to: https://github.com/YDLIDAR/ydlidar_ros_driver#configure-ydlidar_ros_driver-internal-parameter 2) The X4PRO 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.
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 X4PRO, the external power supply of the +5V to the X4PRO needs to be provided through the USB_PWR interface of the USB interface board.
Need help?
Do you have a question about the X4PRO and is the answer not in the manual?
Questions and answers