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

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

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

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

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
5

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

Ed Venator gravatar image

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

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 image angelos.p  ( 2017-07-15 02:18:22 -0500 )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 image ruffsl  ( 2017-07-20 16:17:43 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-07-14 15:18:42 -0500

Seen: 2,367 times

Last updated: Jul 14 '17