ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to run sudo rosrun

asked 2014-10-06 03:12:27 -0500

vd77 gravatar image

updated 2018-04-13 12:33:09 -0500

130s gravatar image

How can I launch rosrun and roslaunch commands with sudo? Why It is not possible by default? Please help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-06 04:47:58 -0500

Wolf gravatar image

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...

edit flag offensive delete link more


Thanq.. I was searching for this only

KDROS gravatar image KDROS  ( 2015-01-28 03:55:53 -0500 )edit

Question Tools


Asked: 2014-10-06 03:12:27 -0500

Seen: 11,285 times

Last updated: Apr 13 '18