ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

Installing a custom dependency with rosdep

asked 2018-06-27 05:46:19 -0600

ejalaa12 gravatar image

updated 2018-06-28 05:03:04 -0600

Hello,

I have a Ros package (let's call it myRosPkg) which depends on a custom version of a python module (that we call myCustomPkg). This python module is on a forked github repository.

I would like rosdep to automatically install this dependency.

To do so, here is what I have done (following the instructions given here and here.

1. Created a custom_deps.yaml with the following content:

myCustomPkg:
    ubuntu: |
        pip install git+https://github.com/user/repo.git@master

2. Append this file to /etc/ros/rosdep/sources.list.d/20-default.list

echo file://$(readlink -f custom_deps.yaml) >> /etc/ros/rosdep/sources.list.d/20-default.list

3. Update rosdep and check install (this is where it fails)

> rosdep update
...
> rosdep resolve myCustomPkg --os=ubuntu:xenial
rosdep detected OS: [elementary] aliasing it to: [ubuntu]
#apt
pip install git+https://github.com/user/repo.git@master

> rosdep check myRosPkg --os=ubuntu:xenial -i
rosdep detected OS: [elementary] aliasing it to: [ubuntu]
System dependencies have not been satisified:
apt pip
apt install
apt git+https://github.com/user/repo.git@master

Is there something wrong I did ? (maybe rosdep is not parsing the command as a multiline string?)

Thanks in advance :)

edit retag flag offensive close merge delete

Comments

Did you copy-paste the yaml content correctly? The following seems to be missing one level of indentation:

myCustomPkg:
ubuntu: |
    ...
gvdhoorn gravatar image gvdhoorn  ( 2018-06-27 05:56:15 -0600 )edit

Yes i just forgot to put it correcly on the question

ejalaa12 gravatar image ejalaa12  ( 2018-06-27 06:54:08 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-06-27 13:23:26 -0600

tfoote gravatar image

The bash syntax you linked to is no longer supported as of rosdep 0.12 several years ago. See the top level header.

http://wiki.ros.org/rosdep/rosdep.yaml

edit flag offensive delete link more

Comments

tfoote gravatar image tfoote  ( 2018-06-27 16:40:19 -0600 )edit

Thank you, and sorry again for the double post. Is there no other way of doing so?

ejalaa12 gravatar image ejalaa12  ( 2018-06-27 16:45:31 -0600 )edit
1

Since you're using pip I'd suggest using the pip installer. The best approach for this would be to use the full url in a pip rule. I don't think that's currently fully supported but a patch to extend the pip installer to support that would be appreciated.

tfoote gravatar image tfoote  ( 2018-06-27 17:02:54 -0600 )edit

See my answer for using a pip rule. What do you mean by not fully supported ?

ejalaa12 gravatar image ejalaa12  ( 2018-06-28 05:11:26 -0600 )edit
0

answered 2018-06-28 05:12:30 -0600

ejalaa12 gravatar image

updated 2018-06-28 05:13:32 -0600

By taking into account @tfoote comment, I tested the following yaml file

myCustomPkg:
    ubuntu:
        pip:
            packages: ["git+https://github.com/user/repo.git@master"]

And it seemed to work. The simulate install gave the following command:

> rosdep check myRosPkg --os=ubuntu:xenial -i
rosdep detected OS: [elementary] aliasing it to: [ubuntu]
System dependencies have not been satisified:
  sudo -H pip install -U git+https://github.com/user/repo@master
edit flag offensive delete link more

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: 2018-06-27 05:46:19 -0600

Seen: 1,226 times

Last updated: Jun 28 '18