ros-drivers / pointgrey_camera_driver

ROS driver for Pt. Grey cameras, based on the official FlyCapture2 SDK.
128 stars 180 forks source link

Install udev rules #111

Closed kmhallen closed 6 years ago

kmhallen commented 7 years ago

The udev rules file in the debian folder was missing for kinetic. This PR generates the proper file in the debian folder by concatenating all files in the udev folder with cmake.

Additionally, the debian post install script has been modified to reload and trigger rules on install. Normally users would have to run these commands manually, or restart.

This method has been fielded at Dataspeed in the package dataspeed_can_usb

mikepurvis commented 6 years ago

The business of creating a file in the source tree is really not preferred, but at least it's fenced off so that it only happens during the binary build.

mikepurvis commented 6 years ago

Upon consideration, I wonder if we could actually just get the desired effect here by calling the file debian/udev rather than debian/ros-x-y-z.udev. At the time that this stuff was originally done, I wasn't quite as familiar with how debhelper works.

Let me give that a try; if it doesn't work, this can be merged as-is.

mikepurvis commented 6 years ago

Okay, yeah— I've confirmed that it does in fact work to simply call the file debian/udev, and then it will get installed no matter what package's name is:

$ dpkg -c ros-indigo-pointgrey-camera-driver_0.13.2-0trusty_amd64.deb | grep udev
drwxr-xr-x root/root         0 2017-07-18 13:38 ./lib/udev/
drwxr-xr-x root/root         0 2017-07-18 13:38 ./lib/udev/rules.d/
-rw-r--r-- root/root      2552 2017-07-18 13:38 ./lib/udev/rules.d/40-ros-indigo-pointgrey-camera-driver.rules

Therefore, #131 replaces this PR. I really appreciate you proposing this change, though, and my apologies for you getting the run-around on it.

kmhallen commented 6 years ago

That is a much more simple solution