The ATTRS fields can be found by running the following when a device is connected :
udevadm info -a -p $(udevadm info -q path -n /dev/ttyACM0)
The symlink makes a /dev/symlink_name entry in /dev linked to the appropriate /dev/tty* node.
After editing the /etc/udev/rules.d/10-local.rules file, run
sudo udevadm trigger
to reload the rules (should also be picked up on reboot).
There's already a 10-local.rules file in the root of the 2017Preseason repo with a NAVX define. Add a rule for the px4 to this, and the lidar as well. Have each use a unique symlink. Keeping the file in the repo makes it easy to set up other machines - just copy the file over and run udevadm trigger.
Update launch files to look for the symlink rather than /dev/ttyACMx or /dev/ttyUSBx.
This is done by adding a line to the file /etc/udev/rules.d/10-local.rules. The format per device is something like :
ACTION=="add", ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="yyyy", SYMLINK+="symlink_name"
The ATTRS fields can be found by running the following when a device is connected :
udevadm info -a -p $(udevadm info -q path -n /dev/ttyACM0)
The symlink makes a /dev/symlink_name entry in /dev linked to the appropriate /dev/tty* node.
After editing the /etc/udev/rules.d/10-local.rules file, run
sudo udevadm trigger
to reload the rules (should also be picked up on reboot).
There's already a 10-local.rules file in the root of the 2017Preseason repo with a NAVX define. Add a rule for the px4 to this, and the lidar as well. Have each use a unique symlink. Keeping the file in the repo makes it easy to set up other machines - just copy the file over and run
udevadm trigger
.Update launch files to look for the symlink rather than /dev/ttyACMx or /dev/ttyUSBx.