Ask Your Question
1

How to install additional ros packages in a docker ros container?

asked 2017-07-14 15:18:42 -0600

updated 2017-07-14 15:21:09 -0600

Dear all,

Recently, I downloaded Docker in my Mac and I pulled the latest ROS container (which is the kinetic-ros-base). I have developed a stack for my robot which includes a URDF description.

URDF is not part of the res-base distribution and cannot catkin_make my workspace.

I tried to apt-get the URDF but it cannot find in the cache. Probably, I need to find a different way to add in ROS.

Does anybody have any idea?

Regards, Angelos

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-07-14 19:30:38 -0600

Ed Venator gravatar image

updated 2017-07-14 19:32:49 -0600

Did you run apt-get update before apt-get install? Many Dockerfiles wipe the apt cache to reduce image size.

So you don't have to reinstall urdf every time your start your container, you could make your own image with a Dockerfile something like this:

FROM ros:kinetic-ros-base
RUN apt-get update && apt-get install -y ros-kinetic-urdf && apt-get clean
edit flag offensive delete link more

Comments

Thanks Ed, worked nice - These are my first days using docker and I didn't know that!

angelos.p gravatar imageangelos.p ( 2017-07-15 02:18:22 -0600 )edit
1

We also wipe the them to prevent users from accidentally using stale or expired caches that could otherwise indeterminate break other dependent docker builds. This also helps prevent users from writing Dockerfiles with bad practices, such as relying on caches from the parent image.

ruffsl gravatar imageruffsl ( 2017-07-20 16:17:43 -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-07-14 15:18:42 -0600

Seen: 692 times

Last updated: Jul 14 '17