Slamtec / rplidar_ros

BSD 2-Clause "Simplified" License
485 stars 527 forks source link

udev rule for multiple rplidar #124

Closed simonbogh closed 1 year ago

simonbogh commented 1 year ago

Hi,

I have two rplidar a2m12 on a mobile platform. Their ports e.g. /dev/ttyUSB0 may be switched around when unplugged or on system restart.

When running udevadm info -a -n /dev/ttyUSBx on both lidars the information is identical e.g. ATTRS{idVendor}=="10c4" and ATTRS{idProduct}=="ea60". How can I properly map or set up a rule to differentiate two lidars on the same robot?

deyouslamtec commented 1 year ago

You can use different USB ports to distinguish rplidar, such as ATTRS {busnum}="3", ATTRS {devpath}="2"。