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

How to run sudo rosrun

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

vd77 gravatar image

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

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
5

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

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

Comments

Thanq.. I was searching for this only

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

Question Tools

Stats

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

Seen: 11,503 times

Last updated: Apr 13 '18