User Manual
www.ydlidar.com Copyright 2015-2018 YDLIDAR Team
9 / 12
FIG 11 G4.LAUNCHDEFAULT CONFIGURATIONS
Device connection
Under Linux, the G4 and PC interconnect processes are consistent with those under Windows. See
Device Connections under Windows.
ROS Driver installation
Before doing the following, make sure that the Kinetic version ROS environment is installed
correctly.
Specific steps are as follows:
(1) Use the command to create the ydlidar_ws workspace and copy the ROS driver package
ydlidar in the G4 package to the ydlidar_ws/src directory. Switch to the ydlidar_ws
workspace and compile again.
$ mkdir -p ~/ydlidar_ws/src
$ cd ~/ydlidar_ws
$ catkin_make
(2) After the compilation is complete, add the ydlidar environment variable to the ~/.bashrc file
and make it effective.
$ echo "source ~/ydlidar_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
(3) Add a device alias /dev/ydlidar to the G4 serial port.
$ cd ~/ydlidar_ws/src/ydlidar/startup
$ sudo chmod +x initenv.sh
$ sudo sh initenv.sh
RVIZ Installation
(1) Installation.