From 709c240889e070c01034e0e2236e53cf17d517e6 Mon Sep 17 00:00:00 2001 From: mostlyjason Date: Thu, 30 Dec 2021 07:08:39 -0500 Subject: [PATCH] Adding LAUNCH_TARGET for Docker --- README.md | 6 ++++++ docker-compose.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 15d4265..1a6e115 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,12 @@ This command does three things: This runs the image specified in the `docker-compose.yml`, which by default runs the command `roslaunch mycobot_320 mycobot_320_slider.launch` within the container. +To run other tutorials, set the LAUNCH_TARGET environment variable. For example, to the run the MoveIt tutorial run: + +``` +export LAUNCH_TARGET=mycobot_320_moveit mycobot320_moveit.launch +docker-compose up ros +``` ### Option 2: Local #### 1.1 Pre-Requriements diff --git a/docker-compose.yml b/docker-compose.yml index fb75766..9f3b8e2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.4' x-app: &common - command: [ "roslaunch mycobot_320 mycobot_320_slider.launch" ] + command: [ "roslaunch ${LAUNCH_TARGET:-mycobot_320 mycobot_320_slider.launch}" ] privileged: true environment: PYTHONUNBUFFERED: 1