Skip to content

Commit bdd8bb3

Browse files
author
Philip Keller
committed
added PROJECT_ROOT handling for project-based isaac configs
1 parent 5e58ac8 commit bdd8bb3

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

scripts/build_image_layers.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ if [[ -f ~/.isaac_ros_common-config ]]; then
4040
. ~/.isaac_ros_common-config
4141
fi
4242

43+
# Override with config from project directory if exists (and is defined)
44+
if [[ ! -z "${PROJECT_ROOT}" ]]; then
45+
print_info "Sourcing project config at: ${PROJECT_ROOT}"
46+
if [[ -f "${PROJECT_ROOT}/.isaac_ros_common-config" ]]; then
47+
. "${PROJECT_ROOT}/.isaac_ros_common-config"
48+
fi
49+
fi
50+
4351
# Prepend configured docker search dirs
4452
if [ ${#CONFIG_DOCKER_SEARCH_DIRS[@]} -gt 0 ]; then
4553
for (( i=${#CONFIG_DOCKER_SEARCH_DIRS[@]}-1 ; i>=0 ; i-- )); do

scripts/run_dev.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ if [[ -f ~/.isaac_ros_common-config ]]; then
3333
. ~/.isaac_ros_common-config
3434
fi
3535

36+
# Override with config from project directory if exists (and is defined)
37+
if [[ ! -z "${PROJECT_ROOT}" ]]; then
38+
print_info "Sourcing project config at: ${PROJECT_ROOT}"
39+
if [[ -f "${PROJECT_ROOT}/.isaac_ros_common-config" ]]; then
40+
. "${PROJECT_ROOT}/.isaac_ros_common-config"
41+
fi
42+
43+
# Make the project root available to nested scripts, eg. build_image_layers.sh
44+
export PROJECT_ROOT="${PROJECT_ROOT}"
45+
fi
46+
3647
# Parse command-line args
3748
IMAGE_KEY=ros2_humble
3849

0 commit comments

Comments
 (0)