Please refer to the ROS 2 Support Policy for the recommended system configurations.

Build

Clone the project and run the following commands:

mkdir -p ~/lgdx_ws/src
cd ~/lgdx_ws/src
git clone https://gitlab.com/lgdxrobotics/lgdxrobot2-rplidar-c1.git -b $ROS_DISTRO
git clone https://gitlab.com/lgdxrobotics/lgdxrobot2-ros2.git -b $ROS_DISTRO
cd ..

# Install build dependencies
rosdep update
rosdep install --from-paths src --ignore-src -y

# Ensure that interfaces is in the system
colcon build --packages-select lgdxrobot2_msgs --symlink-install
source install/setup.bash

colcon build --symlink-install

Configuration

First, configure the permissions for the hardwares.

curl -L -o rplidar.rules https://gitlab.com/lgdxrobotics/lgdxrobot2-rplidar-c1/-/raw/main/udev/rplidar.rules
sudo cp rplidar.rules /etc/udev/rules.d
sudo service udev reload
sudo service udev restart
sudo usermod -a -G dialout $USER

Then, source the setup files for the ROS 2 workspaces.

source ~/lgdx_ws/install/setup.bash