diff --git a/Dockerfile b/Dockerfile index 869be7d..e8a800d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,8 @@ WORKDIR /catkin_ws/src COPY . mycobot_ros # Install build dependencies -RUN apt-get update && \ +RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \ + apt-get update && \ apt-get install -y \ # ROS Build dependencies python-rosinstall \ diff --git a/README.md b/README.md index de01368..533f837 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,20 @@ There are two ways to run this project. The first is by running the project in a [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: +Once docker is installed, run the following command, and the project should show up. + +without NVIDIA GPU: ``` docker-compose build ros && xhost +local:root && docker-compose up ros ``` +with NVIDIA GPU + +``` +docker-compose build nvidia-ros && xhost +local:root && docker-compose up nvidia-ros +``` + This command does three things: 1) `docker-compose build ros` @@ -46,7 +54,7 @@ This command does three things: 3) `docker-compose up ros` This runs the image specified in the `docker-compose.yml`, which by default runs - the command `roslaunch mycobot_ros control_slider.launch` within the container. + the command `roslaunch mycobot_ros mycobot_slider.launch` within the container. ### Option 2: Local diff --git a/docker-compose.yml b/docker-compose.yml index 9b053d1..bbbb5df 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ x-app: &common environment: PYTHONUNBUFFERED: 1 QT_X11_NO_MITSHM: 1 - DISPLAY: :1 + DISPLAY: $DISPLAY volumes: - "/tmp/.X11-unix:/tmp/.X11-unix:rw" build: @@ -19,7 +19,9 @@ x-app: &common services: # This configuration builds the project for computers with NVIDIA hardware - nvidia-ros: *common + nvidia-ros: + <<: *common + runtime: nvidia # This is the default for computers that don't have nvidia hardware accelerators ros: