Welcome to SLAM LiDAR repository
1.Preparation before using the high-speed version of A1 lidar
Preparation before using the high-speed version of A1 lidar
1. Create a new workspace and compile function packages
Take the creation name rplidar_ws as an example, enter in the terminal,
mkdir rplidar_wscd rplidar_wsmkdir srccd srccatkin_init_workspace
Then copy the decompressed rplidar_ros function package to the rplidar_ws/src directory, and then use catkin_make to compile in the rplidar_ws directory.
xxxxxxxxxxcd ~/rplidar_wscatkin_make
After the compilation is passed, add the path of the workspace to .bashrc.
xxxxxxxxxxsudo gedit ~/.bashrc
Copy the following content to the end of the file,
xxxxxxxxxxsource ~/rplidar_ws/devel/setup.bash --extend
2. Bind the radar port name
Open the terminal, enter the following command, and copy the rplidar.rules file under the function package to /etc/udev/rules.d.
xxxxxxxxxxcd ~/rplidar_ws/src/rplidar_ros/scriptssudo cp rplidar.rules /etc/udev/rules.d/Check the port number of the high-speed version of the A1 lidar
xxxxxxxxxxlsusb
Remember the framed port number, enter the /etc/udev/rules.d directory, and modify the port number
xxxxxxxxxxcd /etc/udev/rules.d
xxxxxxxxxxsudo nano rplidar.rules

After modification, press ctrl+s to save, then press ctrl+x to exit and run the modified rule file.
xxxxxxxxxxsudo udevadm triggersudo service udev reloadsudo service udev restart
Re-plug the radar serial port and enter ll /dev/rplidar in the terminal.
The above content indicates that the binding is successful. The end is not necessarily 0 and changes according to the order in which the devices are inserted.
3. Test radar
Re-open a terminal and confirm that the radar model is a1, as shown in the picture. If not, please refer to 0.ReadMe
Enter the following statement to open the radar and display it in rviz,
xxxxxxxxxx##High-speed version a1 lidarroslaunch rplidar_ros view_rplidar_a1.launch
When the above screen appears, it means that all preparations have been completed.
4. Adjust the radar scanning frequency
Find the potentiometer of the radar, as shown in the picture. The potentiometer has a limited position. When it cannot be turned, it means that it has reached the maximum limit or minimum limit and cannot be turned anymore.
Turn clockwise to increase scan frequency
Counterclockwise rotation reduces scan frequency
Keep the previous terminal running, and open a new terminal. Enter the following command to view the adjusted frequency.
xxxxxxxxxxrostopic hz /scan