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 |
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...
Asked: 2014-10-06 03:12:27 -0500
Seen: 11,278 times
Last updated: Apr 13 '18
Works with rosrun but not with roslaunch
multiple launch files lead to multiple log directories.
Use roscore, roslaunch and rosrun in bash script
Rosjava - Launch another node from within rosjava node
Making a desktop user program to roslaunch and kill nodes
pass arg to ros node in launch file
Multiple Robotino co-ordination
Roslaunch required=true only kills nodes in the same machine