YDLidar User Manual

1.Ydlidar-SDK Installation

Before starting the installation, you need to confirm that your machine has built the most basic ROS environment

YDLidar SDK requires CMake 2.8.2+ as dependencies,you can install these packages using apt::

    > sudo apt install cmake pkg-config

Run the following commands to create YDLidar SDK directory and build the project:

        git clone https://github.com/YDLIDAR/YDLidar-SDK.git
    mkdir -p ~/YDLidar-SDK/build
    cd YDLidar-SDK/build
    cmake ..
    make
    sudo make install

Normally, your terminal will display the following message:

d1eadeed96dcced0973157a137d9eae0.jpg

After compiling, you need to package the project:

    cd ~/YDLidar-SDK/build
    cpack # you may use sudo cpack for permission

55af89295013e8a0b6b939e9dc49ec0c.jpg

Then, you can check whether the YDLidar-SDK is successfully installed by using the provided examples.

Running the tri_test if connect with the LiDAR unit(s):

    cd ~/YDLidar-SDK/build
    ./tri_test

If everything is working properly, your terminal will display the following message: tri_test_ppt.jpg

Once you have set the parameters, YDLidar will start working and will print out the following message via the terminal.
d248fa7ac5d9126ae8297caec3d256a4.jpg

At this point, the YDLidar-SDK has been successfully installed.

2.YDLidar ROS Driver Package Installation

Before installing, please make sure you have ROS installed.

First, you need to create a workspace where the package will be stored :

    mkdir -p ~/ydlidar_ws/src
    cd ~/ydlidar_ws/src
    catkin_init_workspace

Clone ydlidar_ros_driver package for github and build the package :

    git clone https://github.com/YDLIDAR/ydlidar_ros_driver.git 
    cd ydlidar_ws
    catkin_make

Package environment setup :

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

Note: Add permanent workspace environment variables. It's convenientif the ROS environment variables are automatically added to your bash session every time a new shell is launched.

At this point, you have finished installing the YDLidar-SDK and the YDLidar-ROS driver package, and next we will describe how to use the ROS driver package.

Note: After completing the previous operation, replug the LiDAR again.

Connect the LiDAR uint(s).

    roslaunch ydlidar_ros_driver lidar_view.launch

If everything is working properly, you should see ydlidar's scan result in the rviz.

c43f86af41d11392402532ee529a3d10.jpg

If your rviz does not show normal results, you may have encountered an unknown error during the installation process and need to re-run the commands in the previous steps.

Official Tutorial-YDLidar SDK

Official Tutorial-YDLidar ROS Driver

results matching ""

    No results matching ""