EasyManua.ls Logo

LSLIDAR CH128X1 - Software Operation Example

LSLIDAR CH128X1
44 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
19
connected normally. If the ping is successful, then the data is received, otherwise
check the hardware connection.
Step 5. Use “sudo tcpdump -n -i eth0” (here eth0 is the name of the wired
network 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 driver and dependency package
The driver and dependency package can also be obtained directly from our
website or customer service. Copy the obtained driver file to the newly created
workspace “leishen_ws/src”, and use the “tar –xvf” command to 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:
rosrun rviz rviz