Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rosdep does not use os_override in all code paths #51

Open
kchristofferson opened this issue Jan 3, 2013 · 11 comments
Open

rosdep does not use os_override in all code paths #51

kchristofferson opened this issue Jan 3, 2013 · 11 comments

Comments

@kchristofferson
Copy link

Was: Failed to detect wheezy OS running rosdep on raspberry

I was stepping through the generic source installation steps to try and install groovy on a raspberry pi.

At step 2.1.3 I ran the command rosdep and failed to find (in my case override) the OS.

pi@raspberrypi ~/ros_catkin_ws $ rosdep install --os=debian:wheezy --from-paths src --ignore-src --rosdistro groovy -y

ERROR: Rosdep experienced an internal error: Could not detect OS, tried ['ubuntu', 'rhel', 'osx', 'opensuse', 'mint', 'gentoo', 'freebsd', 'fedora', 'debian', 'cygwin', 'arch']
Please go to the rosdep page [1] and file a bug report with the stack trace below.
[1] : http://www.ros.org/wiki/rosdep

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/main.py", line 116, in rosdep_main
    exit_code = _rosdep_main(args)
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/main.py", line 257, in _rosdep_main
    return _package_args_handler(command, parser, options, args)
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/main.py", line 338, in _package_args_handler
    return command_handlers[command](lookup, packages, options)
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/main.py", line 483, in command_install
    uninstalled, errors = installer.get_uninstalled(packages, implicit=options.recursive, verbose=options.verbose)
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/installers.py", line 401, in get_uninstalled
    resolutions, errors = self.lookup.resolve_all(resources, installer_context, implicit=implicit)
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/lookup.py", line 348, in resolve_all
    rosdep_keys = self.get_rosdeps(resource_name, implicit=implicit)
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/lookup.py", line 270, in get_rosdeps
    return self.loader.get_rosdeps(resource_name, implicit=implicit)
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/rospkg_loader.py", line 128, in get_rosdeps
    m = self._rospack.get_manifest(resource_name)
  File "/usr/local/lib/python2.7/dist-packages/rospkg-1.0.17-py2.7.egg/rospkg/rospack.py", line 133, in get_manifest
    return self._load_manifest(name)
  File "/usr/local/lib/python2.7/dist-packages/rospkg-1.0.17-py2.7.egg/rospkg/rospack.py", line 172, in _load_manifest
    retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name)
  File "/usr/local/lib/python2.7/dist-packages/rospkg-1.0.17-py2.7.egg/rospkg/manifest.py", line 376, in parse_manifest_file
    _static_rosdep_view = init_rospack_interface()
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/rospack.py", line 55, in init_rospack_interface
    lookup = _get_default_RosdepLookup(Options())
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/main.py", line 107, in _get_default_RosdepLookup
    verbose=options.verbose)
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/sources_list.py", line 497, in create_default
    matcher = DataSourceMatcher.create_default(os_override=os_override)
  File "/usr/local/lib/python2.7/dist-packages/rosdep-0.10.11-py2.7.egg/rosdep2/sources_list.py", line 229, in create_default
    os_name, os_version, os_codename = os_detect.detect_os()
  File "/usr/local/lib/python2.7/dist-packages/rospkg-1.0.17-py2.7.egg/rospkg/os_detect.py", line 405, in detect_os
    raise OsNotDetected("Could not detect OS, tried %s"%attempted)
OsNotDetected: Could not detect OS, tried ['ubuntu', 'rhel', 'osx', 'opensuse', 'mint', 'gentoo', 'freebsd', 'fedora', 'debian', 'cygwin', 'arch']
@tfoote
Copy link
Member

tfoote commented Jan 3, 2013

can you try using ROS_OS_OVERRIDE=foo:bar in your environment and see if it gives a different result? I can't reproduce it on my machine and my guess is that it's creating the filter for the detected os but not using it on Ubuntu machines, which doesn't error.

@kchristofferson
Copy link
Author

I will try in the morning and post results.

Thanks,

Kurt

On Thu, Jan 3, 2013 at 3:03 PM, Tully Foote [email protected]:

can you try using ROS_OS_OVERRIDE=foo:bar in your environment and see if
it gives a different result? I can't reproduce it on my machine and my
guess is that it's creating the filter for the detected os but not using it
on Ubuntu machines, which doesn't error.


Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-11865104.

@tfoote
Copy link
Member

tfoote commented Jan 4, 2013

This is likely connected to #10

@kchristofferson
Copy link
Author

Iset the ros os override environment and received a different error. So, yes, I suspect the issue in #51 and #10 are similar.
I leave this to you as to whether or not to close this as a duplicate.

pi@raspberrypi ~/ros_catkin_ws $ env | grep ROS
ROS_OS_OVERRIDE=debian:wheezy

pi@raspberrypi ~/ros_catkin_ws $ rosdep install --from-paths src --ignore-src --rosdistro groovy -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
ivcon: No definition of [catkin] for OS [debian]
angles: No definition of [catkin] for OS [debian]
urdf: No definition of [catkin] for OS [debian]
.
.
.
geometry_msgs: No definition of [catkin] for OS [debian]
orocos_kdl: No definition of [eigen] for OS version []
rosbag: No definition of [rosconsole] for OS [debian]

@tfoote
Copy link
Member

tfoote commented Jan 8, 2013

I've tracked down the os detection issue. The raspberrypi does not install lsb-release by default, which is what it uses to detect the OS. It does need lsb-release installed to detect debian type systems.

@kchristofferson
Copy link
Author

Thank you

On Mon, Jan 7, 2013 at 5:21 PM, Tully Foote [email protected]:

I've tracked down the os detection issue. The raspberrypi does not install
lsb-release by default, which is what it uses to detect the OS. It does
need lsb-release installed to detect debian type systems.


Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-11980405.

@tfoote
Copy link
Member

tfoote commented Jan 8, 2013

The underlying issue is that rosdep is not passing the os_override into the calls to rospack. This was not an originally designed code path and it relies on the detection to work and not be different than the host. This generally isn't an issue because at this point it is only seeking to find out if the package is a rosdep, not what's its value.

Installing lsb-release will at least make the detection work.

@tfoote
Copy link
Member

tfoote commented Jan 8, 2013

So if you update the deb base-files to get the newer version (7.1) lsb_release will return codename wheezy instead of n/a which makes rosdep much happier. There's still the issue that it does not use the os_override through all code paths. I'm going to retitle this ticket as such. Successfully detecting using lsb_release fixes the failures to lookup with [] version.

For the other ones such as geometry. That means that you do not have that package from source in your CMAKE_PREFIX_PATH (aka the workspace your building for simple cases) and since it can't find it from source it's looking for it from binary packages, and failing.

To get complete sets of sources I suggest using the variant rosinstall generator: I used this url for testing: http://packages.ros.org/web/rosinstall/generate/raw/groovy/ros_comm

@ecuzzillo
Copy link

This also means that rosdep totally ignores both --os=osx:macports and ROS_OS_OVERRIDE=osx:macports, and tries to use brew, at which point tragicomedy ensues and you have to install every single dependency yourself through macports after parsing each error separately to find out about said dependency.

@flixr
Copy link
Contributor

flixr commented Oct 21, 2014

This is still and issue, any chance for a fix?

@mkatliar
Copy link

The issue affects me as well #890 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants