Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/bash

# setup

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
BOLDCYAN="\e[1;96m"
YELLOW="\e[;33m"
ENDCOLOR="\e[0m"

confirm_no() { #https://stackoverflow.com/questions/3231804/in-bash-how-to-add-are-you-sure-y-n-to-any-command-or-alias
read -r -p "${1:-Are you sure? [y/N]} " response
case "$response" in
[yY][eE][sS]|[yY])
true
;;
*)
false
;;
esac
}


# Generate user.config.json
USER_CONFIG_JSON_SOURCE=${SCRIPT_DIR}/simulation/isaac-sim/docker/user_TEMPLATE.config.json
USER_CONFIG_JSON_DESTINATION=${SCRIPT_DIR}/simulation/isaac-sim/docker/user.config.json

echo -e "${BOLDCYAN}1. Generating Default IsaacSim Config ($USER_CONFIG_JSON_DESTINATION)${ENDCOLOR}"

if [ -f $USER_CONFIG_JSON_DESTINATION ]; then
echo -e "${YELLOW}WARNING: The file $USER_CONFIG_JSON_DESTINATION already exists.${ENDCOLOR}"
confirm_no "Do you want to reset it to the default? [y/N]" && cp $USER_CONFIG_JSON_SOURCE $USER_CONFIG_JSON_DESTINATION
else
cp $USER_CONFIG_JSON_SOURCE $USER_CONFIG_JSON_DESTINATION
fi


# AirLab Nucleus Login Config
OMNI_PASS_SOURCE=${SCRIPT_DIR}/simulation/isaac-sim/docker/omni_pass_TEMPLATE.env
OMNI_PASS_DESTINATION=${SCRIPT_DIR}/simulation/isaac-sim/docker/omni_pass.env

echo -e "${BOLDCYAN}2. Configure AirLab Nucleus Login ($OMNI_PASS_DESTINATION)${ENDCOLOR}"

echo "Go to https://airlab-storage.andrew.cmu.edu:8443/omni/web3/, log in, then right click on the cloud and click the \"API Tokens\" window to generate an API token and paste it here. Leave this blank if you want to skip this step: "
if [ -f $OMNI_PASS_DESTINATION ]; then
echo -e "${YELLOW}WARNING: The file $USER_CONFIG_JSON_DESTINATION already exists, leave it blank to skip.${ENDCOLOR}"
fi
read -r -p "API Token: " API_TOKEN

if [ ! -z "${API_TOKEN}" ]; then
sed "s/PASTE-YOUR-API-TOKEN/$API_TOKEN/g" $OMNI_PASS_SOURCE > $OMNI_PASS_DESTINATION
fi
7 changes: 1 addition & 6 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ Install [Docker Desktop](https://docs.docker.com/desktop/install/ubuntu/). This

## Configure

Follow the instructions in `docker/isaac-sim/omni_pass.env` to configure the required settings for your Omniverse Nucelus Server token.
To generate a token, follow the NVIDIA docs [here](https://docs.omniverse.nvidia.com/nucleus/latest/config-and-info/api_tokens.html). See here for more information:
https://airlab.slite.com/app/docs/X8dZ8w5S3GP9tw

Also set the default OMNI_SERVER and accept the license terms. (Basti: The omni_server variable doesn't seem to work. The content browser might have to be edited manually the first time. To do that click:
"Add new connection ..." and enter airlab-storage.andrew.cmu.edu:8443 in the server field. Also if there is a localhost it should be removed since we are not running a local Nucleus server.
Run `./configure.sh` and follow the instructions in the prompts to do an initial configuration of the repo.

## Docker Images

Expand Down
3 changes: 2 additions & 1 deletion simulation/isaac-sim/docker/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
omni_pass.env
.bash_history
.bash_history
user.config.json
1 change: 1 addition & 0 deletions simulation/isaac-sim/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ services:
- ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw
- ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw
- ~/docker/isaac-sim/documents:/root/Documents:rw
- ./user.config.json:/root/.local/share/ov/data/Kit/Isaac-Sim/4.1/user.config.json:rw
# developer stuff
- .dev:/root/.dev:rw # developer config
- .bashrc:/root/.bashrc:rw # bash config
Expand Down
Loading