From 61f76d6edb786835637db7a47b43d7649e65e0d3 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 11 Apr 2021 22:29:52 -0700 Subject: [PATCH] Added documentation for running within docker --- README.md | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 07f95ac..2fa3cbe 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,39 @@ Download ROS [http://wiki.ros.org/ROS/Installation](http://wiki.ros.org/ROS/Installation) -## 1. Installation -### 1.1 Pre-Requriements +## 1. Installation +### Option 1: Docker +There are two ways to run this project. The first is by running the project in a container, and this requires +[installing docker](https://docs.docker.com/engine/install/ubuntu/) and +[installing docker-compose](https://docs.docker.com/compose/install/). The benefit of running in the container is that you can run the project in any version of linux, as long as your kernel +is new enough. + +Once docker is installed, run the following command, and the project should show up: + +``` +docker-compose build && xhost +local:root && docker-compose up +``` + +This command does three things: +1) `docker-compose build` + + This builds the project in a container. That means nothing is installed on your host machine! + The first time this runs, this command will take a long while. After running it once, caching + will allow this command to run quickly. + +2) `xhost +local:root` + + This command gives X the ability to display GUI's from within the docker container + +3) `docker-compose up` + + This runs the image specified in the `docker-compose.yml`, which by default runs + the command `roslaunch myCobotROS control_slider.launch` within the container. + + +### Option 2: Local +#### 1.1 Pre-Requriements For using this package, the [Python api](https://github.com/elephantrobotics/pymycobot.git) library should be installed first. @@ -28,7 +58,7 @@ For using this package, the [Python api](https://github.com/elephantrobotics/pym pip install pymycobot --user ``` -### 1.2 Package Download and Install +#### 1.2 Package Download and Install Install ros package in your src folder of your Catkin workspace. @@ -39,7 +69,7 @@ $ cd ~/catkin_ws $ catkin_make ``` -### 1.3 Test Python API +#### 1.3 Test Python API ```bash cd ~/catkin_ws/src/myCobotROS