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,259 times
Last updated: Apr 13 '18
Roslaunch cannot launch node of type: gazebo
Rosjava - Launch another node from within rosjava node
Putting top-level launch files in a catkin metapackage [closed]
Problem with roslaunch on rc.local startup
Can't run rtabmap from roslaunch
Sending start command vs starting node.
the problem when running the node rviz
[SOLVED] rosrun - Couldn't find executable
What will happen if a 'roscore' has already been run when I run a launch file?