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 | ros @ Robotics Stack Exchange |
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...
Asked: 2014-10-06 03:12:27 -0600
Seen: 11,494 times
Last updated: Apr 13 '18