Copyright 2022 EAI All Rights Reserved
9 / 13
3.3
ROS Driver Installation
1)
Cloning GitHub's YDlidar ROS Driver Package:
2)
Build the Ydlidar_ROS_Driver software package:
3)
Package environment Settings:
Note: Add permanent workspace environment variables. It will be very convenient if ROS
environment variables are automatically added to the bash session every time when start a new shell:
4)
Verify that the package path is set, echo the ROS_PACKAGE_PATH variable.
It can be seen something like this: /home/tony/ydlidar_ws/src:/opt/ros/melodic/share
5)
Create Serial Port Alias [Optional]
Note: After completing the previous operation, re-insert the LIDAR again.
https://github.com/YDLIDAR/YDLidar-SDK.git
$ cd YDLidar-SDK/build
$ cmake ..
$ make
$ sudo make install
https://github.com/YDLIDAR/ydlidar_ros_driver.git
ydlidar_ws/src/ydlidar_ros_driver
$ cd ydlidar_ws
$ catkin_make
$ source ./devel/setup.sh
$ echo "source ~/ydlidar_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
$ echo $ROS_PACKAGE_PATH
$ chmod 0777 src/ydlidar_ros_driver/startup/*
$ sudo sh src/ydlidar_ros_driver/startup/initenv.sh