17
device, see the device name of ifconfig wired connection display for details) to view
the data packets sent by the Lidar (as shown in the figure, there are 1206-byte data
packets sent by the Lidar to the destination, which means that the Lidar data is sent
normally).
Figure 4.9
sudo tcpdump -n -i eth0
Command Feedback
4.2.2 Software Operation Example
Step 1.
Establish a workspace and build a compilation environment
mkdir -p ~/leishen_ws/src
cd ~/leishen_ws
Note
: The workspace can be named arbitrarily. For example, “leishen_ws” can be
changed to any name.
Step 2.
Download the Lidar ROS driver
The ROS driver can also be obtained directly from our website or customer service.
Copy the obtained driver file to the newly created workspace “src”, and decompress it.
Step 3.
Compile and package
cd ~/leishen_ws
catkin_make
Step 4.
Run the program
source ~/leishen_ws /devel/setup.bash
roslaunch lslidar_ch_decoder lslidar_ch.launch
Reopen a terminal again and execute the following command:
rviz
Note 1)
: If the Lidar destination port and motor speed are modified, please open
“lslidar_ch.launch” to modify the configuration accordingly. The default data packet
port is 2368, device packet port is 2369, IP address is 192.168.1.200.