Skip to content

Commit

Permalink
Merge pull request #16 from kevinzakka/script-fix
Browse files Browse the repository at this point in the history
Add option to skip menagerie clone in install script.
  • Loading branch information
kevinzakka committed Mar 16, 2024
2 parents c5d82be + c12ba1a commit 2523c3d
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,23 @@
# Install dependencies (macOS and Linux).
# Command line arguments:
# --no-soundfonts: Skip downloading soundfonts.
# --no-menagerie: Skip copying shadow_hand menagerie model.

set -x

SKIP_SOUNDFONTS=false
SKIP_MENAGERIE=false
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--no-soundfonts)
SKIP_SOUNDFONTS=true
shift
;;
--no-menagerie)
SKIP_MENAGERIE=true
shift
;;
*)
echo "Unknown argument: $key"
exit 1
Expand Down Expand Up @@ -70,12 +76,14 @@ if [ "$SKIP_SOUNDFONTS" = false ]; then
fi

# Copy shadow_hand menagerie model to robopianist.
cd third_party/mujoco_menagerie
git checkout 1afc8be64233dcfe943b2fe0c505ec1e87a0a13e
cd ../..
mkdir -p robopianist/models/hands/third_party/shadow_hand
if [ ! -d "third_party/mujoco_menagerie/shadow_hand" ]; then
echo "third_party/mujoco_menagerie/shadow_hand does not exist. Run git submodule init && git submodule update first."
exit 1
if [ "$SKIP_MENAGERIE" = false ]; then
cd third_party/mujoco_menagerie
git checkout 1afc8be64233dcfe943b2fe0c505ec1e87a0a13e
cd ../..
mkdir -p robopianist/models/hands/third_party/shadow_hand
if [ ! -d "third_party/mujoco_menagerie/shadow_hand" ]; then
echo "third_party/mujoco_menagerie/shadow_hand does not exist. Run git submodule init && git submodule update first."
exit 1
fi
cp -r third_party/mujoco_menagerie/shadow_hand/* robopianist/models/hands/third_party/shadow_hand
fi
cp -r third_party/mujoco_menagerie/shadow_hand/* robopianist/models/hands/third_party/shadow_hand

0 comments on commit 2523c3d

Please sign in to comment.