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

Running a python script with sudo in Groovy [closed]

asked 2013-08-02 09:48:32 -0500

DroidDave gravatar image

updated 2014-01-28 17:17:31 -0500

ngrennan gravatar image

Hi all,

I have groovy running and the "hello world" working fine. I am writing a python script that needs to directly write to a memory address (e.g. set 0x1234 high). I have to run this script with root permissions, sudo ./scripts/mymemmoryscript.py. I get the following error:

Traceback (most recent call last): File "mymemmoryscript.py", line 9, in <module> import roslib; roslib.load_manifest('beginner_tutorials') ImportError: No module named roslib

I notice the same with the tutorial file talker.py:

./scripts/talker.py - runs fine sudo ./scripts/talker.py - gets the error above

Is there a way to sudo run python scripts int the ROS Groovy enviroment? I tried looking through the wiki for help but couldn't find answer.

Thanks in advance, DD

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by 130s
close date 2013-08-04 18:32:52

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-08-04 18:29:18 -0500

DroidDave gravatar image

Got it, didn't see that there was a different PYTHONPATH for root, just had to export the roslib path to that as well.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-08-02 09:48:32 -0500

Seen: 2,131 times

Last updated: Aug 04 '13