ROS2

[ROS2] RPLiDAR A3M1 ROS2(foxy) package install 및 /scan topic echo test

reidlo 2023. 5. 27. 20:23

1. Git Clone

cd ${your ros2 workspace}/src
git clone -b ros2 https://github.com/Slamtec/rplidar_ros.git

2. Colcon Compile

cd ${your ros2 workspace}/src/rplidar_ros
colcon build --symlink-install
cd ../../
colcon build --packages-select rplidar_ros
source install/setup.bash

3. ttyUSB 권한 부여

ls -l /dev | grep ttyUSB
sudo chmod 666 /dev/ttyUSB0

cd ${your ros2 workspace}/src/rpldiar_ros/
source scripts/create_udev_rules.sh

4. ROS2 Launch

ros2 launch rplidar_ros rplidar_a3_launch.py

5. ROS2 /scan topic echo

ros2 topic echo /scan