Ask Your Question
0

Rosdep Melodic vs Kinetic

asked 2019-11-06 23:40:45 -0600

Tonу gravatar image

I have <depend>python-rpi.gpio</depend> dependency in my package and rosdep install --from-paths src --ignore-src -r -y works fine in Kinetic since it installs rpi-gpio with sudo -H pip install -y python-rpi.gpi command but it fails in Melodic with the error:

ERROR: the following rosdeps failed to install
    apt: command [sudo -H apt-get install -y python-gpiozero] failed
    apt: Failed to detect successful installation of [python-gpiozero]

because it tries to do sudo -H apt-get install -y python-rpi.gpi

Is there any way to make rosdep install use pip in Melodic or there is another way to fix it?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-11-07 01:39:31 -0600

gvdhoorn gravatar image

updated 2019-11-07 02:02:56 -0600

I don't know why this is the case, but I can explain how rosdep decides to use apt on Bionic while it uses pip on Xenial.

If we look at ros/rosdistro/rosdep/python.yaml, which is where rosdep gets its information about how to map keys to actual packages, we see this for the python-gpiozero key (from here):

python-gpiozero:
  ...
  ubuntu:
    ...
    bionic: [python-gpiozero]
    ...
    xenial:
      pip:
        packages: [gpiozero]
    ...

we can clearly see that for xenial, the pip installer is requested, while for bionic, only the package name is listed, which will make rosdep use the default installer for that OS, which would be apt.

It looks like these keys were added in ros/rosdistro#16544,which initially used pip for everything, but based on a comment by @tfoote changed to apt for some OS.

The package does exist according to packages.ubuntu.com (here), but I also get Unable to locate package python-gpiozero trying to install it using apt.

I would suggest to figure out why that is the case, instead of trying to force the use of pip (which would be impossible, short of changing the key for python-gpiozero).


Edit: ah, I overlooked the available architectures listed on packages.ubuntu.com/bionic/python-gpiozero. It looks like that package is only available for arm64 and armhf. I'm trying this on amd64, so it would make sense for apt not being able to find it. pip does not check these sort of things, so it will happily install anything, anywhere (which may then still fail).

Are you running rosdep on arm64 or armhf?

edit flag offensive delete link more

Comments

Yes, thank you, I was trying to run it on amd64

Tonу gravatar imageTonу ( 2019-11-07 14:01:06 -0600 )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

1 follower

Stats

Asked: 2019-11-06 23:40:45 -0600

Seen: 15 times

Last updated: Nov 07