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

How to download ROS Melodic on 19.04 with Docker containers

asked 2019-05-23 00:43:25 -0500

oo92 gravatar image

I am running Ubuntu 19.04 and as a result, unable to run ROS on my system. I was told that I could run it on my machine with docker containers, which would avoid the need of downgrading my distro. How can one accomplish this? How do I know which ROS files/dependencies need to be added to the docker containers?


edit retag flag offensive close merge delete



Does wiki/docker help?

gvdhoorn gravatar image gvdhoorn  ( 2019-05-23 02:46:10 -0500 )edit

FIrst time I'll ever be using Docker so that's a little too advanced.

oo92 gravatar image oo92  ( 2019-05-23 02:52:12 -0500 )edit

What is too advanced? If you can clarify what you find unclear perhaps we can help, but using Docker is never going to be easy I'm afraid. It's going to take some learning / getting used to.

If you have no experience with Docker whatsoever I would strongly recommend first completing some tutorials that focus solely on Docker itself. Don't mix in ROS. Learning multiple topics at the same time that also interact with each other is -- in my experience -- not the best thing to do.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-23 03:23:29 -0500 )edit

I imagined so. Basically I want to know which ROS files/dependencies need to be added to docker.

oo92 gravatar image oo92  ( 2019-05-23 03:24:50 -0500 )edit

One of the first tutorials under the wiki/docker page (this one) shows you that there are already official Docker images for ROS, ROS 2, Gazebo and other projects available. See fi.

Unless you're doing something custom or specialised, I'd suggest to start with those first.

And finally: if you start from an image such as ubuntu:xenial, you could just follow the regular Ubuntu installation tutorials for ROS. There are no special requirements there.

Refer to osrf/docker_images/ros/kinetic/ubuntu/xenial/ros-core/Dockerfile for an example.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-23 03:30:49 -0500 )edit

I am running ubuntu:disco-dingo, which is 19.04

oo92 gravatar image oo92  ( 2019-05-23 04:43:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-23 03:39:15 -0500

gvdhoorn gravatar image

updated 2019-05-23 03:39:35 -0500

The basic answer to your question would be (after having installed Docker):

docker pull ros:melodic

Or perhaps (if you'd like to use the GUI tools as well):

docker pull osrf/ros:melodic-desktop-full

To actually run something:

docker run -it --rm osrf/ros:melodic-desktop-full roscore

As I noted in the comments, there is more to this, so I would recommend taking a look at wiki/docker for a start.

Getting used to Docker can take some time, so I would try to get comfortable with it before trying to solve all sorts of ROS-related problems with it.

Finally: running things in a Docker container is never going to give you the same experience as running them 'natively' (ie: on your host machine): using GUI tools can get involved (although tools like osrf/rocker exist), you'll be mounting directories into containers all the time, file permissions can be difficult to manage and (in my opinion) Docker isn't really meant for what you are implying you want to do with it (ie: daily development).

If you're just starting out it may not be the easiest way to get going, but it is certainly a technique that would let you run ROS Melodic on an Ubuntu Disco setup.

edit flag offensive delete link more

Question Tools



Asked: 2019-05-23 00:43:25 -0500

Seen: 5,014 times

Last updated: May 23 '19