background image

www.ydlidar.com

Copyright 2015-2020 YDLIDAR

8/11

ROS Driver Installation

Before doing the following, make sure that the Kinetic version ROS environment is installed
correctly.

1. Use the command to create the ydlidar_ws workspace and copy the ROS driver package
ydlidar_ros_driver in the YDLIDAR package to the ydlidar_ws/src directory. Switch to the
ydlidar_ws workspace and compile again.

2. After the compilation is complete, add the ydlidar_ws environment variable to the ~/.bashrc
file and make it effective.

3. Add a device alias /dev/ydlidar to the YDLIDAR serial port.

RVIZ installation

1. Online installation

2. If something went wrong, update the source cache and re-install it.

$ mkdir -p ~/ydlidar_ws/src

$ cd ~/ydlidar_ws

$ catkin_make

$ echo "source ~/ydlidar_ws/devel/setup.bash" >> ~/.bashrc

$ source ~/.bashrc

$ cd ~/ydlidar_ws/src/ydlidar_ros_driver/startup

$ sudo chmod +x initenv.sh

$ sudo sh initenv.sh

$

sudo

apt-get

install

python-serial

ros-kinetic-serial

g++

vim

\

ros-kinetic-turtlebot-rviz-launchers

$ sudo apt-get update

Summary of Contents for YDLIDAR G2

Page 1: ...www ydlidar com Copyright 2015 2020 YDLIDAR 1 11 USER MANUAL...

Page 2: ...G6 3 WINDOWS USAGE GUIDE 4 Device connection 4 Driver Installation 5 LINUX ROS OPERATION 7 Device connection 7 YDLidar SDK Installation 7 ROS Driver Installation 8 RVIZ installation 8 Run ROS Package...

Page 3: ...The development kit of YDLIDAR is an accessory tool provided for performance evaluation and early development of the sensors YDLIDAR X2 X4 YDLIDAR X2 X4 USB Micro cable USB Adapter board PH2 0 8P YDL...

Page 4: ...pter board 1 This component is used for USB to UART functions Also supports the serial port DTR signal to the Lidar motor stop control PWR is provided for auxiliary power supply PH2 0 8P cable 1 This...

Page 5: ...forms or PCs is weak and the Lidar needs to access the 5V auxiliary power supply otherwise it will work abnormally FIG 3 AUXILIARY POWER SUPPLY Driver Installation To evaluate and develop the YDLIDAR...

Page 6: ...lick the exe file and follow the prompts to install it FIG 5 YDLIDAR DRIVER INSTALLATION I After the installation is complete you can right click on My Computer and select Properties On the Open Syste...

Page 7: ...connect processes are consistent with those under Windows See Device Connection under Window YDLidar SDK Installation Before doing the following make sure that the git and cmake is installed correctly...

Page 8: ...the compilation is complete add the ydlidar_ws environment variable to the bashrc file and make it effective 3 Add a device alias dev ydlidar to the YDLIDAR serial port RVIZ installation 1 Online ins...

Page 9: ...After running the launch file open rviz to view the YDLIDAR scan results as shown in the following figure FIG 8 YDLIDAR RVIZ Modify Angle Problem The scanning data seen by running the launch file is d...

Page 10: ...unch file of the corresponding Lidar model take X4 as an example The contents are as shown in the figure FIG 9 YDLIDAR LAUNCH FILE 2 YDLIDAR coordinates follow the right hand rule within ROS with an a...

Page 11: ...y illuminate the lidar s vision system If you need to use it outdoors please avoid that the its vision system is directly facing the sun This may cause permanent damage to the vision system s sensor c...

Reviews: