DFRobot LiDAR LD19 Laser Sensor Kit Instruction Manual
- June 9, 2024
- DFROBOT
Table of Contents
- PRODUCT DESCRIPTION
- COMMUNICATION INTERFACE
- DATA PROTOCOL
- define PO/NT_PER_PACK 12
- define HEADER 0x54
- Example
- COORDINATE SYSTEM
- DEVELOPMENT KIT INSTRUCTIONS
- _First open the terminal interface, you can use the shortcut key of
- _If the Ubuntu system you are using does not have the git tool installed,
- Download the source code of the product ROS function package:
- if ROS_DISTRO in ‘kinetic’ or ‘melodic’
- if ROS_DISTRO in ‘noetic’
- First open the terminal interface, you can use the shortcut key of
- If the Ubuntu system you are using does not have the git tool installed, you
- Download the source code of the product ROS2 function package:
- or
- First open the terminal interface, you can use the shortcut key of
- If the Ubuntu system you are using does not have the git tool installed, you
- Download the source code:
- or
- If the build folder does not exist in the ldlidar_st/_sdk directory, it
- eg: ./ldlidar_stl /dev/ttyUSBO
- stepl: Make sure the lidar device is connected to the raspberrypi SBC, and
- step2: Retrieve the port device file corresponding to the radar device
- Note: It is recommended to update the Lldar ROS driver package in the
- REVISION HISTORY
- References
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
DFRobot LiDAR LD19 Laser Sensor Kit
PRODUCT DESCRIPTION
The LD19 is mainly composed of laser ranging core, wireless telex unit, wireless communication unit, angle measurement unit, motor drive unit and mechanical casing.
The LD19 ranging core uses DTOF technology, which can measure 4,500 times per second. Each time the distance is measured, the LD19 emits an infrared laser forward, and the laser is reflected to the single-photon receiving unit after encountering the target object. From this, we obtained the time when the laser was emitted and the time when the single-photon receiving unit received the laser. The time difference between the two is the time of flight of light. The time of flight can be combined with the speed of light to calculate the distance.
After obtaining the distance data, the LD19 will combine the angle values measured by the angle measurement unit to form point cloud data, and then send the point cloud data to the external interface through wireless communication. LD19supports internal speed control, the speed can be stabilized to 10±0.1Hz within3seconds after power-on. At the same time, PWM external input interface is provided to support external speed control. After the external control unit obtains the speed, it is controlled by PID algorithm closed-loop, and the PWM signal is input to maketheLD19 reach the specified speed.
An illustration of the environmental scan formed by the LD19 point cloud data is shown below:
COMMUNICATION INTERFACE
The LD19 uses ZH1.5T-4P 1.5mm connector to connect with external system to realize power supply and data reception. The specific interface definition and parameter requirements are shown in the following figure/table:
port number| signal name| type| descript ion|
mini mum| typical| maxi mum
---|---|---|---|---|---|---
1| Tx| output| LiDAR
data output
| ov| 3.3V| 3.5V
2| PWM| input| motor control| ov| –| 3.3V
3| GND| power supply| negative| –| ov| –
4| P5V| power supply| positive| 4.5V| 5V| 5.5V
The LD19 has a motor driver with step less speed regulation, which supports internal speed control and external speed control. When the PWM pin is grounded, the default is internal speed regulation, and the default speed is 10±0.1Hz. For external speed control, a square wave signal needs to be connected to the PWM pin, and the start, stop and speed of the motor can be controlled through the duty cycle of the PWM signal. Conditions for triggering external speed control: a. Input PWM frequency 20-50K, recommended 30K; b. Duty cycle is within (45%, 55%) interval (excluding 45% and 55%), and at least 100ms continuous input time. After the external speed control is triggered, it is always in the external speed control state, and the internal speed control will be restored unless the power is turned off and restarted; at the same time, the speed control can be performed by adjusting the PWM duty cycle. Due to the individual differences of each product motor, the actual speed may be different when the duty cycle is set to a typical value. To accurately control the motor speed, it is necessary to perform closed-loop control according to the speed information in the received data. Note: When not using external speed control, the PWM pin must be grounded.
The data communication of LD19 adopts standard universal asynchronous serial port (UART) one-way transmission, and its transmission parameters are shown in the following table:
baud rate| data length| | stop bit| | parity bit| |
flow control
---|---|---|---|---|---|---|---
230400bit/s| 8 Bits| I| 1| I| none| I| none
DATA PROTOCOL
Data packet format
The LD19 adopts one-way communication. After stable operation, it starts to send measurement data packets without sending any commands. The measurement packet format is shown in the figure below.
Header| VerLen| Speed| | Start angle| Data| End
angle| Timestamp| CRC check
---|---|---|---|---|---|---|---|---
54H| I Byte| LSB| MSB| LSB| MSB| ……| LSB| MSB| LSB| MSB| I Byte
- Header: The length is 1 Byte, and the value is fixed at 0x54, indicating the beginning of the data packet;
- Verlen: The length is 1 Byte, the upper three bits indicate the packet type, which is currently fixed at 1, and the lower five bits indicate the number of measurement points in a packet, which is currently fixed at 12, so the byte value is fixed at 0x2C;
- Speed: The length is 2 Byte, the unit is degrees per second, indicating the speed of the lidar;
- Start angle: The length is 2 Bytes, and the unit is 0.01 degrees, indicating the starting angle of the data packet point;
- Data: Indicates measurement data, a measurement data length is 3 bytes, please refer to the next section for detailed analysis;
- End angle: The length is 2 Bytes, and the unit is 0.01 degrees, indicating the end angle of the data packet point;
- Timestamp : The length is 2 Bytes, the unit is milliseconds, and the maximum is 30000. When it reaches 30000, it will be counted again, indicating the timestamp value of the data packet;
- CRC check: The length is 1 Byte, obtained from the verification of all the previous data except itself. For the CRC verification method, see the following content for details;
The data structure reference is as follows:
define PO/NT_PER_PACK 12
define HEADER 0x54
typedef struct attribute((packed))
{ uint16_t distance;
uint8_t intensity; } LidarPointStructDef;
typedef struct attribute((packed)) {
uint8_t: header;
uint8 t: ver_len;
uint16_t: speed;
uint16 t: start_ angle;
LidarPointStructDef point[POINT_PER_PACK};
uint16 t: end_angle;
uint16_t: timestamp;
uint8 t: crc8;
}LiDARFrameTypeDef;
The CRC check calculation method is as follows:
static canst uint8_t CrcTable{256]={
0x00, 0x4d, 0x9a, 0xdl, 0x79, 0x34, 0xe3,
0xae, 0xf2, 0xbf, 0x68, 0x25, 0x8b, 0xc6, 0x11, 0x5c, 0xa9, 0xe4, 0x33,
0xle, 0xd0, 0x9d, 0x4a, 0x0l, 0x5b, 0x16, 0xcl, 0x8c, 0x22, 0x6f, 0xb8,
0xf5, 0xlf, 0x52, 0x85, 0xc8, 0x66, 0x2b, 0xfc, 0xbl, 0xed, 0xa0, 0xll,
0x3a, 0x94, 0xd9, 0x0e, 0x43, 0xb6, 0xfb, 0x2c, 0x61, 0xcf, 0x82, 0x55,
Ox18, Ox44, Ox09, Oxde, Ox93, Ox3d, OxlO, Oxal, Oxea, Ox3e, Ox73, Oxa4,
Oxe9, Ox47, OxOa, Oxdd, Ox90, Oxee, Ox81, Ox56, Oxlb, Oxb5, Oxf8, Ox2f,
Ox62, Ox97, Oxda, OxOd, Ox40, Oxee, Oxa3, Ox74, Ox39, Ox65, Ox28, Oxff,
Oxb2, Oxle, Ox51, Ox86, Oxeb, Ox21, Ox6e, Oxbb, Oxf6, Ox58, Ox15, Oxe2,
Ox8f, Oxd3, Ox9e, Ox49, Ox04, Oxaa, Oxel, Ox30, Oxld, Ox88, Oxe5, Ox12,
Ox5f, Oxfl, Oxbe, Ox6b, Ox26, Oxla, Ox37, OxeO, Oxad, Ox03, Ox4e, Ox99,
Oxd4, Oxle, Ox31, Oxe6, Oxab, Ox05, Ox48, Ox9f, Oxd2, Ox8e, Oxe3, Ox14,
Ox59, Oxfl, Oxba, Ox6d, Ox20, Oxd5, Ox98, Ox4f, Ox02, Oxae, Oxel, Ox36,
Oxlb, Ox27, Ox6a, Oxbd, OxfO, Ox5e, Ox13, Oxe4, Ox89, Ox63, Ox2e, Oxf9,
Oxb4, Oxla, Ox57, Ox80, Oxed, Ox91, Oxde, OxOb, Ox46, Oxe8, Oxa5, Ox72,
Ox3f, Oxca, Ox87, Ox50, Oxld, Oxb3, Oxfe, Ox29, Ox64, Ox38, Ox75, Oxa2,
Oxef, Ox41, OxOe, Oxdb, Ox96, Ox42, OxOf, Oxd8, Ox95, Ox3b, Ox76, Oxal,
Oxee, OxbO, Oxfd, Ox2a, Ox67, Oxe9, Ox84, Ox53, Oxle, Oxeb, Oxa6, Ox71,
Ox3e, Ox92, Oxdf, Ox08, Ox45, Ox19, Ox54, Ox83, Oxee, Ox60, Ox2d, Oxfa,
Oxbl, Ox5d, Ox10, Oxel, Ox8a, Ox24, Ox69, Oxbe, Oxf3, Oxaf, Oxe2, Ox35,
Ox 78, Oxd6, Ox9b, Ox4e, Ox01, Oxf4, Oxb9, Ox6e, Ox23, Ox8d, OxeO, Oxl 7,
Ox5a, Ox06, Ox4b, Ox9e, Oxdl, Oxlf, Ox32, Oxe5, Oxa8 };
uint8_t CaJCRC8{uint8_t p, uint8_t Jen){
uint8_t ere= O;
uint16_t i;
for (i = O; i < Jen; i++){
ere= CreTabJe[(ere J\ p++) & Oxff]; }
return ere;
Measurement data analysis
Each measurement data point consists of a 2-byte distance value and a 1-byte confidence value, as shown in the figure below.
Header| VerLen| Speed| Start angle| Data| End
angle| Timestamp| CRC check
---|---|---|---|---|---|---|---
54H| 2cH| LSB| MSB| LSB| MSB| ……| LSB| MSB| LSB| MSB| lByte
Measuring point 1 | Measuring point 2 | … | Measuring point n |
---|---|---|---|
distance | intensity | distance | intensity |
LSB | MSB | 1 Byte | LSB |
The unit of distance value is mm. The signal intensity value reflects the light reflection intensity. The higher the intensity, the larger the signal intensity value; the lower the intensity, the smaller the signal intensity value. For a white object within 6m, the typical value of the signal strength value is around 200. The angle value of each point is obtained by linear interpolation of the starting angle and the ending angle. The angle calculation method is as follows:
step= (end_angle -start_angle)/(Jen -1);
angle= start_angle + step*i;
where Jen is the number of measurement points in a data packet, and the value
range of i is [O, Jen).
Example
Suppose we receive a piece of data as shown below.
54 2C 68 08 AB 7E EO 00 E4 DC 00 E2 D9 00 ES DS 00 E3 D3 00 E4 DO 00 E9 CD 00
E4 CA 00 E2 C7 00 E9 CS 00 ES C2 00 ES CO 00 ES BE 82 3A lA 50
We analyze it as follows:
Header| VerLen| Speed| Start angle| Data| End
angle| Timestamp| CRC check
---|---|---|---|---|---|---|---
54H| 2CH| 68H| 08H| ABH| 7EH| ……| BEH| 82H| 3AH| lAH| 50H
Measuring point 1| Measuring point 2|
•••
| Measuring point 12
---|---|---|---
distance| intensity| distance| intensity| | distance|
intensity
EOH| OOH| E4H| DCH| OOH| E2H| …| BOH| OOH| EAH
Field information| Parsing process
---|---
Speed| 0868H = 2152 degrees per second;
Start angle| 7EABH = 32427, or 324.27 degrees;
End angle| 82BEH = 33470, or 334.7 degrees;
Measuring point I distance| OOEOH = 224mm
Measuring point 1 intensity| E4H = 228
Measuring point 2 distance| OODCH = 200mm
Measuring point 2 intensity| OOE2H= 226
…| …
Measuring point 12 distance| OOBOH = 176mm
Measuring point 12 intensity| EAH=234
COORDINATE SYSTEM
The LD19 uses a left-handed coordinate system, the rotation center is the coordinate origin, the front of the sensor is defined as the zero-degree direction, and the rotation angle increases clockwise, as shown in the figure below.
DEVELOPMENT KIT INSTRUCTIONS
How to use the assessment tool
Hardware cable connection and description
-
LiDAR, wire, USB adapter board, as shown in the following figure:
-
Connection diagram, as shown in the figure below:
Driver installation under Windows
When evaluating the company’s products under Windows, it is necessary to
install the serial port driver of the USB adapter board. The reason is that
the USB adapter board in the development kit provided by the company adopts
the CP2102 USB to serial port adapter chip, and its driver can be obtained
from Silicon Download from Labs’ official website:
https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
Or,After decompressing the CP210x_Universal_Windows_Driver driver package, execute the exe file in the driver installation package directory, and select X86 (32-bit) or X64 (64-bit) according to the Windows system version.
Double-click the exe file and follow the prompts to install it.
After the installation is complete, connect the USB adapter board in the development kit to the computer, right-click [My Computer], select [Properties], and in the opened [System] interface, select [Device Manager] in the left menu to enter Go to the device manager, expand [Ports], you can see the serial port number corresponding to the recognized CP2102 USB adapter, that is, the driver is installed successfully, and the figure below is COM4.
Using LdsPointCloudViewer software under Windows
The point cloud visualization software LdsPointCloudViewer can display the scanned data of this product in real time, and developers can use this software to visually observe the scanning renderings of this product. Before using this software, it is necessary to distinguish that the driver of the USB adapter board of this product has been installed successfully, and the product is interconnected with the USB port of the Windows system PC, then double- click the LdsPointCloudViewer.exe, and select the corresponding product model and port number, click the Start point cloud refresh button, as shown in the following figure.
In the above figure,
‘Speed’ represents the lidar scanning frequency, unit: Hz;
‘Rate’ represents the lidar data packet resolution rate;
‘Valid’ represents the valid point for the lidar to measure a circle.
Product 3D model file
Unzip the LiDAR_LD19_3D_stp_Vl.0 file to obtain a 3D model file in STP format.
Operation based on ROS under Linux
ROS environment introduction and installation
ROS (Robot Operating System) is an open source meta-operating system for robots and middleware built on Linux. It provides the services expected of an operating system, including hardware abstraction, low-level device control, implementation of commonly used functions, message passing between processes, and package management. It also provides the tools and library functions needed to obtain, compile, write, and run code across computers. For the installation steps of each version of ROS, please refer to the official ROS website: http://wiki.ros.org/ROS/lnstallation
The ROS function package of this product supports the following versions and environments:
- ROS Kinetic(Ubuntu16.04);
- ROS Melodic(Ubuntu18.04);
- ROS Noetic(Ubuntu20.04).
Get the source code of the ROS Package
The source code of the ROS function package of this product is hosted on the repository of Github. You can download the source code of the master or main branch by accessing the repository network link, or download it through the git tool.Users can also directly extract SDK LD19 > ldlidar stl ros.zi to the following path for use.
-
Repository website address
► https://github.com/DFRobotdl/ldlidarstlros -
git tool download operation
_First open the terminal interface, you can use the shortcut key of
ctrl+alt+t_
_If the Ubuntu system you are using does not have the git tool installed,
you can install it as_
follows:
$ sudo apt-get install git
Download the source code of the product ROS function package:
$ cd ~
_$ mkdir -p ldlidar_rosws/src
_$ cd ~/ldlidar_rosws/src
_$git clone https://github.com/DFRobotdl/ldlidar_stl_ros.git_
#or
_$ unzip ldlidar_stlros.zip
Set device permissions
First, connect the lidar to our adapter module (CP2102 adapter), and connect
the module to the computer. Then, open a terminal under the ubuntu system and
enter Is /dev/ttyUSB*
to check whether the serial device is connected. If a
serial port device is detected, use the sudo ch mod 777 /dev/ttyUSB*
command
to give it the highest authority, that is, give the file owner, group, and
other users read, write and execute permissions, as shown in the following
figure.
Finally, modify the port_name
value in the ld19.launch
file in the
~/ldldiar_ros_ws/src/ldlidar_stl_ros/launch/
directory. Take the lidar
mounted in the system as /dev/ttyUSB0 as an example, as shown below.
$ nano ~/Jdlidar ros ws/src/ldldiar _stl_ros/launch/ld19.launch
Linux nano editor: Ctrl + 0 saves the edited file; Ctrl + X exits the editing interface.
Build and environment settings
-
Use the catkin compilation system to compile and build the product function package:
$ cd ~/fdlidauos~ws
. $ catkin_make - Function package environment variable settings:
After the compilation is completed, you need to add the relevant files generated by the compilation to the environment variables, so that the ROS environment can recognize them. The execution command is as follows. This command is to temporarily add environment variables to the terminal, which means that if you reopen a new terminal, you also need to re-execute it. The following command.
$ cd ~/tdlidar_ros_ws
$ source devel/setup.bash
In order to never need to execute the above command to add environment variables after reopening the terminal, you can do the following.
$ echo source ~//dlidar_ros_ws/devel/setup.bash » ~/bashrc
$ source ~/bashrc
Run node and Rviz display LiDAR point cloud
Start the lidar node and execute the following command.
$ roslaunch ldlidar_stl_ros ld19.launch
Start the lidar node and display the lidar point cloud data on Rviz, execute the following command.
if ROS_DISTRO in ‘kinetic’ or ‘melodic’
$ ros/aunch ldlidar_st/_ros viewer_ld19_kinetic_me/odic.launch
if ROS_DISTRO in ‘noetic’
$ ros/aunch ldlidar_st/_ros viewer_ld19_noetic.launch
Operation based on ROS2 under Linux
ROS2 environment introduction and installation
ROS (Robot Operating System) is an open source meta-operating system for
robots and middleware built on Linux. It provides the services expected of an
operating system, including hardware abstraction, low-level device control,
implementation of commonly used functions, message passing between processes,
and package management. It also provides the tools and library functions
needed to obtain, compile, write, and run code across computers. The robotics
and ROS community has changed a lot since ROS was launched in 2007. The goal
of the ROS2 project is to adapt to these changes, leveraging the strengths of
ROSl and improving on the weaknesses. For the installation steps of ROS2,
please refer to the official website of ROS2:
https://docs.ros.org/en/foxy/lnstallation.html
The ROS2 function package of this product supports the use of the ROS2 foxy
version and above.
Get the source code of ROS2 Package
The source code of the ROS2 function package of this product is hosted on the
repositories of Github. You can download the source code of the master or main
branch by accessing the network link of the repository, or download it through
the git tool.Users can also directly extract SDK LD19 > ldlidar_stl_ros2.ziR
to the following path for use.
-
Repository website address
► https://github.com/DFRobotdl/ldlidarstlros2 -
git tool download operation
First open the terminal interface, you can use the shortcut key of
ctrl+alt+t
If the Ubuntu system you are using does not have the git tool installed, you
can install it as
follows:
$ sudo apt-get install git
Download the source code of the product ROS2 function package:
$ cd ~
$ mkdir -p ldlidarros2 ws/src
$ cd ~/ldlidar_ros2_ws/src
$ git clone https://github.com/DFRobotdl/ldlidar_st/_ros2.git
or
$ unzip ldlidar_st/_ros2.zip
Set device permissions
First, connect the lidar to our adapter module (CP2102 adapter), and connect
the module to the computer. Then, open a terminal under the ubuntu system and
enter Is /dev/ttyUSB*
to check whether the serial device is connected. If a
serial port device is detected, use the sudo chmod 777 /dev/ttyUSB*
command
to give it the highest authority, that is, give the file owner, group, and
other users read, write and execute permissions, as shown in the following
figure.
Finally, modify theport_name
value in the ld19.launch.py
file in the
~/ldldiar_ros2_ws/src/ldlidar_stl_ros2/launch/
directory. Take the lidar
mounted in the system as/dev/ttyUSBO
as an example, as shown below.
$ nano ~ /ldlidar ros2 ws/src/ldldiar_stl_ros2/launch/ld19.launch.py
Linux nano editor: Ctrl + 0 saves the edited file; Ctrl + X exits the editing interface.
Build and environment settings
-
Use the colcon compilation system to compile and build the product function package:
$ cd ~/fdlidauos2~ws
. $ co/con build - Function package environment variable settings:
After the compilation is completed, you need to add the relevant files generated by the compilation to the environment variables, so that the ROS2 environment can be recognized. The execution command is as follows. This command is to temporarily add environment variables to the terminal, which means that if you reopen a new terminal, you also need to re-execute it. The following command.
$ cd ~/Jdlidar_ros2_ws
$ source install/setup.bash
In order to never need to execute the above command to add environment variables after reopening the terminal, you can do the following.
$ echo source ~/Jdlidar_ros2_ws/install/setup.bash » ~j.bashrc
$ source ~j.bashrc
Run node and Rviz2 display LiDAR point cloud
Start the lidar node and execute the following command.
$ ros2 launch ldlidar_stl_ros2 ld19.launch.py
Start the lidar node and display the lidar point cloud on Rviz2, execute the following command.
$ ros2 launch ldlidar_stl_ros2 viewer_ld19.launch.py
Instructions for using SDK under Linux
Get the source code of SDK
The source code of the Linux SOK of this product is hosted on the repositories
of Github. You can download the source code of the master or main branch by
accessing the network link of the repository, or download it through the
gittool. Users can also directly extract SOK L019 > ldlidar stl sdk.zip
to
the following path for use.
-
Repository website address
► https://github.com/OFRobotdl/ldlidarstlsdk -
git tool download operation
First open the terminal interface, you can use the shortcut key of
ctrl+alt+t
If the Ubuntu system you are using does not have the git tool installed, you
can install it as
follows:
$ sudo apt-get install git
Download the source code:
$ cd ~
$ mkdir ldlidar_ws
$ cd ~/ldlidar_ws
$ git clone https://github.com/DFRobotdl/ldlidar_stl_sdk.git
or
$ unzip ldlidar_stl_sdk.zip
Set device permissions
First, connect the lidar to our adapter module (CP2102 adapter}, and connect
the module to the computer. Then, open a terminal under the ubuntu system and
enter Is /dev/ttyUSB*
to check whether the serial device is connected. If a
serial port device is detected, use the sudo chmod 777 /dev/ttyUSB*
command
to give it the highest authority, that is, give the file owner, group, and
other users read, write and execute permissions, as shown in the following
figure.
Build
The source code is coded in C++11 standard C++ language and C99 standard C language. Use CMake, GNU-make, GCC and other tools to compile and build the source code. If you use Ubuntu system without the above tools installed, you can execute the following command to complete the installation.
$ sudo apt-get install build-essential cmake
If the tools indicated above already exist in the system, do the following.
$ cd ~/ldlidar_ ws/ldlidar_stl_sdk
If the build folder does not exist in the ldlidar_st/_sdk directory, it
needs to be created
$ mkdir build
$ cd build
$ cmake .. /
$make
Run binary program
$ cd ~/ldlidar_ ws/ldlidar_st/_sdk/build
$ ./ldlidar_stl <seria/_number>
eg: ./ldlidar_stl /dev/ttyUSBO
Instructions for using ROS based on Raspberry Pi SBC
Please refer to the manual « LD19 Raspberry Pi Raspbian User manual_
V2.9.pdf)) for details.
In addition, we have provided a custom image for Raspberry Pi for this
product, and its usage tutorial is as follows:
Introduction to mirroring
-
Mirror composition:
• raspberrypi raspbian OS version: 2020-08-20-raspios-buster-armhf
• ROS environment version: ROS melodic
• LiDAR LD19 ROS Package -
Hardware support:
• raspberrypi 3B+ SBC , raspberrypi 4B SBC
• SD card with a capacity greater than or equal to 16GB
Mirror usage
-
Download image file:
• Download link 1: https://pan.baidu.com/s/lfvTfXBbWC9ESXNNUY5aJhw 1Jt:&:7ky8a
• Download link 2:
https://drive.google.com/file/d/lylMTFGRZ9cRcy3Njvf10cxDo4Wy3tfCB/view?usp=sharing
• The image file name is 2022-03-24-raspios-buster-armhf-ldrobot- customization.img.xz -
Write the image file to SD card and run the system:
Write through the Win32Disklmager tool, insert it into the Raspberry Pi card slot after successful writing, and power on the system -
System login related information
• Username:pi
• Hostname:raspberrypi
• Pass wardpi
-
Running the lidar node
stepl: Make sure the lidar device is connected to the raspberrypi SBC, and
open a terminal via the
shortcut Ctrl+Alt+ T.
step2: Retrieve the port device file corresponding to the radar device
through Is-I/dv1i
, give executable
permission, and then modify the lanuch file parameters. Take the port file
corresponding to the lidar device
as /dev/ttyUSB0 as an example.
$ sudo chmod 777 /dev/ttyUSB0
Note: It is recommended to update the Lldar ROS driver package in the
mirror for the first time
$ cd ~ && cd ~/ldlidar_ros_ws/src/
$ rm -rf ldlidar_stl_ros/
$ git clone https://github.com/DFRobotdl/ldlidar_stl_ros.git
Finally, modify the port_name
value in the ld19.launch file in the
~/ldldiar_ros_ws/src/ldlidar_stl_ros/launch/
directory. Take the lidar
mounted in the system as /dev/ttyUSBO
as an example, as shown below.
$ nano ~/ldlidar ros ws/src/ldldiar _stl_ros/launch/ld19.launch
Start the lidar node and execute the following command.
$ roslaunch ldlidar_stl_ros ld19.launch
Start the lidar node and display the lidar point cloud data on Rviz, execute the following command.
$ ros/aunch ldlidar_st/_ros viewer_ld19_kinetic_me/odic./aunch
REVISION HISTORY
version | revision date | modify the content |
---|---|---|
1.0 | 2020-09-01 | Initial creation |
1.1 | 2021-01-15 | Remove the Transform() function |
2.0
|
2022-02-27
| Added the content of the development kit instruct ions
2.1
|
2022-03-06
| Increase the graphic design of the document and revise the content format
2.2
|
2022-03-09
| Modify the document cover title and part of the content
2.3| 2022-03-15| Revise problematic statements in documentation
2.4| 2022-04-02|
- Modify the LOGO;
- Added 30 model file resource introduction;
- Add the introduction of Raspberry Pi custom image usage;
- Fix the error in the description of the document
2.5| 2022-06-25|
- Added support for ROS2 Humble version;
- Modify Rviz, Rviz2 to display the relevant content of laser point cloud;
- Modify the relevant content of the Windows point cloud host computer
| |
References
- ROS/Installation - ROS Wiki
- Installation — ROS 2 Documentation: Foxy documentation
- GitHub - DFRobotdl/ldlidar_stl_ros
- GitHub - DFRobotdl/ldlidar_stl_ros
- GitHub - DFRobotdl/ldlidar_stl_ros2
- GitHub - DFRobotdl/ldlidar_stl_ros2
- GitHub - DFRobotdl/ldlidar_stl_sdk
- GitHub - DFRobotdl/ldlidar_stl_sdk
- 请输入提取码_百度网盘
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>