Ask Your Question
0

Catkin_make requires root

asked 2013-07-02 13:30:59 -0500

sterlingm gravatar image

updated 2013-11-18 19:32:22 -0500

tfoote gravatar image

I recently switched to groovy and am having troubles with a metapackage...

When I run catkin_make as root, it works fine. When I try to run it as my user, it fails with a big stack trace of:

import roslib;roslib.load_manifest(PACKAGE)
File "/opt/ros/groovy/lib/python2.7/dist-packages/roslib/launcher.py", line 62, in load_manifest
sys.path = _generate_python_path(package_name, _rospack) + sys.path
File "/opt/ros/groovy/lib/python2.7/dist-packages/roslib/launcher.py", line 93, in _generate_python_path
m = rospack.get_manifest(pkg)
File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 136, in get_manifest
return self._load_manifest(name)
File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 175, in _load_manifest
retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name)
File "/usr/lib/pymodules/python2.7/rospkg/manifest.py", line 392, in parse_manifest_file
_static_rosdep_view = init_rospack_interface()
File "/usr/lib/pymodules/python2.7/rosdep2/rospack.py", line 58, in init_rospack_interface
lookup = _get_default_RosdepLookup(Options())
File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 109, in _get_default_RosdepLookup
verbose=options.verbose)
File "/usr/lib/pymodules/python2.7/rosdep2/sources_list.py", line 552, in create_default
sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose)
File "/usr/lib/pymodules/python2.7/rosdep2/sources_list.py", line 459, in load_cached_sources_list
with open(cache_index, 'r') as f:
IOError: [Errno 13] Permission denied: '/home/myusername/.ros/rosdep/sources.cache/index'
make[2]: *** [/home/myusername/ros_packages/devel/include/corobot_camera/parametersConfig.h] Error 1
make[1]: *** [corobot/corobot_camera/CMakeFiles/corobot_camera_gencfg.dir/all]    Error 2
Traceback (most recent call last):
File "/home/myusername/ros_packages/src/corobot/corobot_state_tf/cfg/parameters.cfg", line 4, in <module>
import roslib;roslib.load_manifest(PACKAGE)
File "/opt/ros/groovy/lib/python2.7/dist-packages/roslib/launcher.py", line 62, in load_manifest
sys.path = _generate_python_path(package_name, _rospack) + sys.path
File "/opt/ros/groovy/lib/python2.7/dist-packages/roslib/launcher.py", line 93, in _generate_python_path
m = rospack.get_manifest(pkg)
File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 136, in get_manifest
return self._load_manifest(name)
File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 175, in _load_manifest
retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name)
File "/usr/lib/pymodules/python2.7/rospkg/manifest.py", line 392, in parse_manifest_file
_static_rosdep_view = init_rospack_interface()
File "/usr/lib/pymodules/python2.7/rosdep2/rospack.py", line 58, in init_rospack_interface
lookup = _get_default_RosdepLookup(Options())
File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 109, in _get_default_RosdepLookup
verbose=options.verbose)
File "/usr/lib/pymodules/python2.7/rosdep2/sources_list.py", line 552, in create_default
sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose)
File "/usr/lib/pymodules/python2.7/rosdep2/sources_list.py", line 459, in load_cached_sources_list
with open(cache_index, 'r') as f:
IOError: [Errno 13] Permission denied: '/home/myusername/.ros/rosdep/sources.cache/index'
make[2]: *** [/home/myusername/ros_packages/devel/include/corobot_state_tf/parametersConfig.h] Error 1
make[1]: *** [corobot/corobot_state_tf/CMakeFiles/corobot_state_tf_gencfg.dir/all] Error 2
make: *** [all] Error 2

The permissions on the root of the catkin workspace, its src directory, and all packages are drwxrwxr-x and my username is listed as the owner and group for all ... (more)

edit retag flag offensive close merge delete

Comments

What are the permissions on /home/myusername/.ros? That seems to be where the errors are coming from ...

lindzey gravatar imagelindzey ( 2013-07-02 20:04:49 -0500 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2013-07-03 00:10:30 -0500

dornhege gravatar image

This might origin from some old/wrong setup instructions. Can you say how you setup/installed ROS, especially rosdep. Maybe there are still leftovers to be corrected somewhere.

To fix it, hard delete the .ros/rosdep directory (as root). If .ros also has root permissions, you should also delete that and then re-initialize rosdep as:

sudo rosdep init
rosdep update

Note: No sudo for the second call.

edit flag offensive delete link more

Comments

1

Yup, I've also seen this error when people mistakenly added a sudo to the second call. It's a common mistake; maybe rosdep should print a warning when called as root for rosdep update.

Martin Günther gravatar imageMartin Günther ( 2013-07-03 01:41:42 -0500 )edit
2
Martin Günther gravatar imageMartin Günther ( 2013-07-03 01:48:37 -0500 )edit

Thanks, this fixed the catkin_make problem! I just did 1)sudo rm -r ~/.ros/rosdep 2) sudo rosdep init 3) rosdep update

sterlingm gravatar imagesterlingm ( 2013-07-03 05:39:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-07-02 13:30:59 -0500

Seen: 4,674 times

Last updated: Jul 03 '13