rursprung / fhgr-mrproj2

A ROS 1 based tank with a LIDAR.
GNU General Public License v3.0
2 stars 2 forks source link

add udev rule to set mode 0666 for LIDAR USB port #43

Closed rursprung closed 1 year ago

rursprung commented 1 year ago

/dev/ttyUSB0 needs to have mode 666 for the LIDAR to work. this can either be achieved manually using sudo chmod 666 /dev/ttyUSB0 or using an udev rule. we should try the latter (the file can be here in the repo and - in the best case - part of the cmake install command to copy it to the correct location at /etc/udev/rules.d/). an example for something similar can be found for turtlebot3, the line will look something like this:

ATTRS{idVendor}=="0483" ATTRS{idProduct}=="df11", MODE:="0666"

the idVendor and idProduct attributes will of course have to be replaced by the correct values for our LIDAR (which can be found with lsusb when it's connected).

note: this is only relevant on the actual RPi, this has no impact on the simulation (where we don't have the real LIDAR).

rursprung commented 1 year ago

rplidar actually brings a script along to take care of this :)

running $(rospack find rplidar_ros)/scripts/create_udev_rules.sh should be enough as long as rplidar is set as a dependency (in package.xml) and installed (via rosdep install).

rursprung commented 1 year ago

taken care of by documenting in the README that the script for the udev rule has to be run