Hello smart people,
I have made a ROS node that makes use of an FTDI library that requires that I run the executable as root to have access to the usb device that the node reads data from. The trouble with running the executable as a super user is that it prevents me from being able to see the roscore master because root uses a different environment and I can't seem to export the ROS master URI location to root's environment variables. Has anyone figured out how to publish/subscribe to rostopics when running a node as a super user?
P.S. Changing permissions on the usb device is not something I think I can do to solve this because FTDI's instructions for use of this library is that I remove the modules that would have the device show up in the /dev/ folder (i.e. rmmod ftdi_sio & rmmod usbserial)
Thanks for the help!
Originally posted by wmrifenb on ROS Answers with karma: 1 on 2016-07-08
Post score: 0
Original comments
Comment by spmaniato on 2016-07-08:
If that's an option, just source the ROS installation and workspaces (as superuser), so that the environment variables will be set. The easiest way would be to actually login as superuser (e.g. sudo su
in Ubuntu) and then source the normal user's .bashrc
(if it's set up with ROS stuff)