Ask Your Question
1

How to specify package version in package.xml or rosdep depends.yaml

asked 2017-02-16 04:08:47 -0600

Michael Kopp gravatar image

I would like to make sure that a specific version of a system package is installed for my ros package.

Let's assume, that I want to make sure, that my rospackage rpkg requires the system dependency foo in version 3.4. I thus want to have foo in version 3.4 installed when I run rosdep update && rosdep install.

I could either include that in the package.xml for that package (e.g. something like <depends>foo:3.4</depends>), but I don't know how.

I could otherwise include that in the depends.yaml (e.g. something like

foo:
  ubuntu: foo=3.4

) but again I don't know how :-(

I know, that it's possible to require/check the version in the CMakeLists.txt, but that is not what I want.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-02-16 06:05:43 -0600

gvdhoorn gravatar image

updated 2017-02-17 11:12:06 -0600

Please see if #q207735 answers your question.

Note btw that version info is currently not used by rosdep and friends. It's only used when generating binary packages (such as debs and rpms) on the buildfarm to resolve dependencies.

As far as I know there is currently no way to get rosdep to install specific versions.

As you write, the find_package(..) calls can require specific versions in your CMakeLists.txt.

PS: depends.yaml is a rather old piece of infrastructure. I'm not sure that is still universally supported these days.


Edit:

Could you give me some more pointers about your comment about depends.yaml? We use a 10-custom.list file in /etc/ros/rosde/sources.list.d and this points to a yaml our_server/depends.yaml which defines packages we provide locally. Is that a bad practice?

That is something else. From your comment I understand that you were distributing a yaml file with some extra depends with your sources (ie: as a sibling to package.xml). That is something that is / was actually possible, but I haven't seen it done much more these days.

What you are doing is essentially a locally extended rosdep db. That is perfectly fine, as long as you understand and accept that those dependencies will not be resolvable by people that don't have access to your extension.

edit flag offensive delete link more

Comments

1

I see. Thank you for your answer. For other people directed to this question, see also this rosdep issue.

Do you see any other way with the ros toolchain to do what I want?

Michael Kopp gravatar imageMichael Kopp ( 2017-02-17 05:40:26 -0600 )edit

Could you give me some more pointers about your comment about depends.yaml? We use a 10-custom.list file in /etc/ros/rosde/sources.list.d and this points to a yaml our_server/depends.yaml which defines packages we provide locally. Is that a bad practice?

Michael Kopp gravatar imageMichael Kopp ( 2017-02-17 06:26:16 -0600 )edit

Do you see any other way with the ros toolchain to do what I want?

well, you can express the requirement in your CMakeLists.txt, but there's no way to get rosdep to check it for you unfortunately :( (that I know of. I would like to be proven wrong).

gvdhoorn gravatar imagegvdhoorn ( 2017-02-17 11:08:58 -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: 2017-02-16 04:08:47 -0600

Seen: 692 times

Last updated: Feb 17 '17