From: Luiz G. B. M. <lui...@gm...> - 2010-03-19 13:43:52
|
Hello, I think this tool is of general interest: I wanted to have coherent links in /dev/ to each one of my two hokuyo. But udev can not see the device serial numbers, although it can see the vendor id and other info. So I have done this way: 1- I added a small util, a stripped down hokuyo_aist_example.cpp, that just connects to the laser, prints out the serial number, and exits. 2- I added a udev rule that calls that util, gets the serial number, and creates a link named /dev/hokuyo_* where * is the serial number, pointing to the appropriate /dev/ACM* 3- Now everytime I connect an hokuyo, I get a nice specific link to each device. I tested with URG04 and UTM30 and both work. The doc.dox file should explain a little more. People use the the same approach with ROS: http://www.hsi.gatech.edu/hrl-wiki/index.php/Linux_Tools The attached patch, which also includes the udev rule, was obtained with: lgm@palma:~/orca/gearbox/src/hokuyo_aist$ svn diff . ----------------------------- Luiz Gustavo Bizarro Mirisola |