ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How does rosdep install decide which packages to apt-get install?

asked 2019-03-19 02:47:55 -0500

KenYN gravatar image

updated 2019-03-19 03:31:56 -0500

When running rosdep install on a clean machine it pulls down lots of packages from apt-get or whatever is installed. As far as I can determine, it is something connected with the package.xml, but sometimes a <depend>foo</depend> ends up installing libfoo-dev.

Where is the code that does this? Is there an option to apt-get remove afterwards as a Docker image won't usually need the -dev variants?

I would guess there isn't an automatic way to do this, but if I could find the logic I could cobble something together for my own needs.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-03-19 03:50:19 -0500

gvdhoorn gravatar image

updated 2019-03-19 04:20:25 -0500

When running rosdep install on a clean machine it pulls down lots of packages from apt-get or whatever is installed. As far as I can determine, it is something connected with the package.xml, but sometimes a <depend>foo</depend> ends up installing libfoo-dev.

Please see whether #q215059 and #q217475 answer your questions sufficiently.

Is there an option to apt-get remove afterwards as a Docker image won't usually need the -dev variants?

No, there is no option for that (in rosdep at least), but package manifests should split out their dependencies in exec and build dependencies. If they do that properly, you could automate removing the build dependencies. Unfortunately this would also depend on the rosdep db containing separate keys for devel and runtime dependencies, which isn't always the case (and in addition on all platforms that you'd like to deploy to, to actually split dependencies such that they are different for build and run phases, which isn't always the case either).

I would guess there isn't an automatic way to do this, but if I could find the logic I could cobble something together for my own needs.

You might be interested in taking a slightly different approach, seeing as you're already using Docker.

See the Hermetic Robot Deployment Using Multi-Stage Dockers presentation from ROSCon'18: video (slides).

edit flag offensive delete link more

Comments

#q215059 has a lot of useful info. The slides look good too. Building our own distribution in one container then copying over the /opt/ros/ directory to another and installing things until it stops breaking seems the way to go.

KenYN gravatar image KenYN  ( 2019-03-19 04:17:09 -0500 )edit

Building our own distribution in one container then copying over the /opt/ros/ directory to another and installing things until it stops breaking seems the way to go.

I'm not sure that is what the presenter means / they are doing. I believe the video of the presentation should clear things up a bit.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-19 04:19:57 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-19 02:47:55 -0500

Seen: 404 times

Last updated: Mar 19 '19