From 0495c9421793b52429e2b29db33e6e20a639f36c Mon Sep 17 00:00:00 2001 From: Mehul Goel Date: Fri, 10 Jan 2025 23:10:55 -0800 Subject: [PATCH] added env var for docker environment, waiting for SC and NAND --- .env.dev | 2 -- Dockerfile | 3 ++- docker-dev.yml | 3 --- rb_ws/environments/docker_env.bash | 4 ++++ 4 files changed, 6 insertions(+), 6 deletions(-) create mode 100755 rb_ws/environments/docker_env.bash diff --git a/.env.dev b/.env.dev index c3681e7..54a8182 100755 --- a/.env.dev +++ b/.env.dev @@ -5,6 +5,4 @@ WEBCAM_PORT=/dev/null RLSENSE_PORT=/dev/null TEENSY_PORT=/dev/null FEATHER_PORT=/dev/null -ROOT_DIR="/rb_ws/src/buggy" -SCRIPTS_DIR="$ROOT_DIR/buggy" diff --git a/Dockerfile b/Dockerfile index 4ffeb8d..9b0305e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,8 @@ RUN echo 'source "/opt/ros/humble/setup.bash" --' >> ~/.bashrc && \ echo 'cd rb_ws' >> ~/.bashrc && \ echo 'colcon build --symlink-install' >> ~/.bashrc && \ echo 'source install/local_setup.bash' >> ~/.bashrc && \ - echo 'chmod -R +x src/buggy/scripts/' >> ~/.bashrc + echo 'chmod -R +x src/buggy/scripts/' >> ~/.bashrc && \ + echo 'source environments/docker_env.bash' >> ~/.bashrc # add mouse to tmux RUN echo 'set -g mouse on' >> ~/.tmux.conf diff --git a/docker-dev.yml b/docker-dev.yml index c2000e5..6dd0db3 100755 --- a/docker-dev.yml +++ b/docker-dev.yml @@ -15,9 +15,6 @@ services: env_file: .env.dev environment: - DISPLAY=host.docker.internal:0 - - ROOT_DIR=${ROOT_DIR:-/rb_ws/src/buggy} - - SCRIPTS_DIR=${SCRIPTS_DIR:-/rb_ws/src/buggy/buggy} - - PYTHONPATH=${SCRIPTS_DIR:-/rb_ws/src/buggy/buggy} hostname: main ports: - "0.0.0.0:8765:8765" # foxglove bridge diff --git a/rb_ws/environments/docker_env.bash b/rb_ws/environments/docker_env.bash new file mode 100755 index 0000000..f580c4d --- /dev/null +++ b/rb_ws/environments/docker_env.bash @@ -0,0 +1,4 @@ +#!/bin/sh +export RBROOT=/rb_ws +export PYTHONPATH=$PYTHONPATH:$RBROOT/src/buggy/scripts +export TRAJPATH=$RBROOT/src/buggy/paths/ \ No newline at end of file