Giter VIP home page Giter VIP logo

docker-ros-desktop-full's Introduction

ROS Melodic - VNC-enabled Docker container

Docker container featuring a full ROS Melodic Ubuntu Bionic installation. Quick and easy way to set up ROS in an isolated environment, with convenient HTML5 and VNC to access the desktop environment. Heavily based on bpinaya's project.

Setup

You'll need to install Docker in your computer, if you've used Docker before this step should be straightforward, otherwise check this link for more information about it.

  • Installation's instructions for Ubuntu can be found HERE
  • Installation's instructions for Windows can be found HERE
  • Installation's instructions for MacOS can be found HERE

In some Linux distros (e.g. Ubuntu) you need to run docker with admin privileges. You can hide this by setting an alias

echo "alias docker='sudo docker'" >> ~/.bash_aliases

or

sudo addgroup --system docker
sudo adduser $USER docker
newgrp docker

Running the container

After having installed Docker, you can pull the image and run the container with

docker run -it --rm fbottarel/ros-desktop-full-vnc

This will pull the image from the repo and start it as a container. You will be logged as root in the container console and will see some debug messages.

alt text

For a quick sanity check, you can run in another terminal

docker exec -it `docker ps -l -q` bash

This will open a terminal console in the container, letting you type in whatever command you might need. Try launching roscore or any command you would expect to work in a ROS installation. If the ros master spins up, everything seems in order.

Using your container

You can make use of the HTML5 interface by launching the container with a specific port

docker run -it --rm -p 6080:80 fbottarel/ros-desktop-full-vnc

and then you can access to it by navigating to

localhost:6080

or

127.0.0.1:6080

in any browser window. You should see your desktop like this:

alt text

If you want to use a VNC client (Like RealVNC), go with

docker run -it --rm -p 6080:80 -p 5900:5900 fbottarel/ros-desktop-full-vnc

Then open it in your VNC viewer with the port 5900.

Share files with the container

The image comes with a catkin workspace already set up in /home/ubuntu/ros_wsp. You can write and pull packages in the container, however keep in mind that any change will be gone when you kill the container. Make sure to push your changes (either with docker commit, or on any external software repo e.g. github) before you kill the container.

A fast and easy way to retain any change in your catkin workspace is to mount it as a volume in the host operating system. For instance, let's say you use Ubuntu and your catkin workspace is in /home/fbottarel/catkin_ws, you can run the container with the following command

docker run -it --rm -p 6080:80 -p 5900:5900 -v /home/fbottarel/catkin_ws:/home/ubuntu/ros_ws /fbottarel/ros-desktop-full-vnc

You can populate the directory as you wish from the host system, and the packages will show up in the container workspace (and vice versa!).

Acknowledgements

  • This image is based on FCWU image , that has the support for the VNC server with browser support, so no VNC client is needed, kudos to him!
  • Part of the readme and the images come from bpinaya's project. Equal kudos must be delivered there :P

docker-ros-desktop-full's People

Contributors

bpinaya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.