Skip to content

Commit

Permalink
added install script
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineRichard committed Sep 10, 2024
1 parent 01fbbf9 commit 85f9270
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
30 changes: 30 additions & 0 deletions scripts/extract_dems_override.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

echo "Extracting DEMs..."
CWD=$(pwd)
DEMS_PATH=$CWD/tmp
TGT_PATH=$CWD/assets/Terrains/SouthPole

echo "Reading DEMs info..."
for dem in $(ls $DEMS_PATH/*.tif); do
dem_name_no_ext="${dem%.*}"
gdalinfo $dem > $dem_name_no_ext.info
python3 scripts/process_info.py --info_path $dem_name_no_ext.info --output_dir $DEMS_PATH --output_name $dem_name_no_ext
python3 scripts/preprocess_dem.py --dem_path $dem --output_dir $DEMS_PATH --output_name $dem_name_no_ext.npy
done
echo "Finished extracting DEMs."

echo "Moving DEMs to $TGT_PATH..."
mkdir -p $TGT_PATH
for dem in $(ls $DEMS_PATH/*.npy); do
dem_name_no_ext="${dem%.*}"
dem_name_no_ext=$(basename $dem_name_no_ext)
mkdir -p $TGT_PATH/$dem_name_no_ext
mv $dem $TGT_PATH/$dem_name_no_ext/dem.npy
mv $DEMS_PATH/$dem_name_no_ext.yaml $TGT_PATH/$dem_name_no_ext/dem.yaml
done
echo "Finished moving DEMs."

echo "Cleaning up..."
rm -rm $DEMS_PATH
echo "Finished cleanup."
24 changes: 24 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Pulls WorldBuilder
git submodule init
git submodule update

# Install GDAL
sudo apt-get install gdal-bin
sudo apt-get install libgdal-dev
version=$(gdal-config --version)

# Install Python packages for Isaac Sim
~/.local/share/ov/pkg/isaac_sim-2023.1.1/python.sh -m pip install opencv-python omegaconf hydra-core skyfield gdal==$version zfpy, gdown, black, numba

# Download the assets from Google Drive
gdown 1LfdJ8cogFU8Eid2EL-0bu9E383lftC_W
unzip assets_v6.zip
rm assets.zip

# Download the DEMs of the lunar southpole and format them.
./scripts/get_dems.sh
./scripts/extract_dems_override.sh
# Get Ephemeris data
./scripts/get_ephemeris_data.sh

0 comments on commit 85f9270

Please sign in to comment.