ros-drivers / pointgrey_camera_driver

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

Debian postinst and postrm scripts to set usbcore values in grub #130

Closed kmhallen closed 6 years ago

kmhallen commented 6 years ago

Added postinst and postrm scripts that modify grub to set usbcore.usbfs_memory_mb=1000 at boot. This is recommended in the troubleshooting section of the wiki.

mikepurvis commented 6 years ago

I appreciate the intent here as far as saving hassle for users, but I don't think this is a reasonable thing to be doing— I would be quite upset if a random ROS package were mutating my grub configuration without my knowledge, particularly since this is a driver that works with ethernet cameras as well, where a USB parameter doesn't do anything at all.

If you need this for yourself (or your robots), I'd suggest making a standalone deb for it, and distributing that on Launchpad. Then you can simply install that package at the same time that this one is installed, to get the same effect. You'd be welcome to advertise the availability of such a package via this package's ROS wiki page.

I think the best thing we could do for users as far as usbfs_memory_mb would be perhaps adding a startup test to the driver. So it reads the value of /sys/module/usbcore/parameters/usbfs_memory_mb, and if it sees the default (16), and sees you connecting to a USB camera, it throws up a logwarn directing the user to the wiki page for details about improving capture performance.

Does that make sense?

kmhallen commented 6 years ago

I totally understand. I implemented this as part of a private package, and I thought I'd share it.

mikepurvis commented 6 years ago

Okay, I've filed a separate ticket for the business of testing usbfs_memory_mb. Thanks again.