Skip to content
Tony Yu Cao edited this page Dec 3, 2016 · 6 revisions

Docker

ROS and the other required software is now available in a docker image. It has currently only been tested on Linux, but it should work on Mac and Windows.

Getting Docker and the image

The Docker application itself is available for Linux, MacOS 10.10.3 or higher and Windows 10 Pro, Enterprise and Education editions from the Docker website.. There are additional requirements listed there.

Once installed, the image can be downloaded by running:

docker pull jamak9/sailing-robot

Scripts

I have 3 scripts that I use that help with running and interacting with the container. These will work on Linux, should work on Mac and wont work on Windows. (If someone has a Mac or Windows and can edit this so it fits with them, it would be appreciated please.)

sailing-robot.sh

docker run --name sailing-robot -h sailing-robot -v <Path to your sailing-robot github clone here>:/home/pi/sailing-robot --rm -it jamak9/sailing-robot:indigo

The docker image does not include a clone of the github repository, instead it sets up a direct link between /home/pi/sailing-robot within the container and your clone of the github repositiry on your computer. For this to work you need to change <Path to your sailing-robot github clone here> in the above script to the correct location. This allows the python code to be immediately available to ROS inside the container after you have edited it on your computer. This direct link works both ways, so anything that you edit within /home/pi/sailing-robot directly edits the corresponding files on your computer.

When the above is run, you will find your self at the command prompt within the docker container.

For ROS to work, after you have confirmed that /home/pi/sailing-robot does point to the right location you need to run catkin_make. You should only need to run this once, unless you re-clone the github repository.

sr-bash.sh

docker exec -it sailing-robot bash

When run in your computer, this will open another bash terminal on the container for you to use. It will only work when the container is already running.

sr-ssh.sh

ssh 172.17.0.2 -l pi -X

This will ssh into the container with X-forwarding. Again the container needs to be already running, you also need to have started the ssh server by running /home/pi/start-ssh-server within the container.

The password is 'raspberry'.

Clone this wiki locally