running node as root successful with su rosrun but fails to connect with master with sudo tag in launch
Hi all,
As indicated, I have a particular node I would like to run with root to interface with some GPIO hardware. I'm aware of the recommendations against running anything as root and also recommendations to export the pin, etc. I'm running my ROS environment on an Odroid, using the canonical GPIO library WiringPi to access the pins, and the provider of WiringPi has fairly definitively stated the pins on the odroid cannot be exported; we must run as root.
I have followed the template as posed here: http://answers.ros.org/question/16524... by setting up passwordless sudo. I've also set up the ROS environment variables for the root user. When I have all other nodes running, I can launch my node as root user (no other setup preamble) in one terminal and interface with it in another terminal, and all works as expected. I should also mention we run a startup script at load to source the necessary files and run the roslaunch file. All nodes should be present without user input after startup has finished.
When launching with roslaunch and the launch_prefix
tag, however, I get an error stating the ROS_MASTER_URI is not defined in the environment. Also in the error is suggestion to add export ROS_MASTER_URI=http://localhost:11311
to the .bashrc. I've done this for my standard user .bashrc, but I still get the error and the node process dies.
Would definitely appreciate some guidance or opinion.
Thanks very much!