How to run sudo rosrun
How can I launch rosrun and roslaunch commands with sudo? Why It is not possible by default? Please help.
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |
How can I launch rosrun and roslaunch commands with sudo? Why It is not possible by default? Please help.
Its not possible because sudo is calling the command as root; and your enviroment variables (source setup.bash) are not set for user root!
Theoretically you could log in as root (sudo su
) then source and setup everything and then run your nodes as root; However, I'd highly recommend not to do that and find a way to run your nodes as normal user...
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2014-10-06 03:12:27 -0600
Seen: 10,169 times
Last updated: Apr 13 '18
Easier way to launch nodes and roslaunch
multiple launch files lead to multiple log directories.
Change behavior of killing nodes with same name
How to gazebo master uri in roslaunch file?
can we dynamically turn off respawn attribute?
Running rosjava node from launchfile
Running two nodes for two webcams with usb_cam
[Solved]Problem with rosmake and rosrun usb_cam usb_cam_node
Can I prevent roslaunch from changing the terminal screen title?