Skip to content

Commit 85f9270

Browse files
added install script
1 parent 01fbbf9 commit 85f9270

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

scripts/extract_dems_override.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
echo "Extracting DEMs..."
4+
CWD=$(pwd)
5+
DEMS_PATH=$CWD/tmp
6+
TGT_PATH=$CWD/assets/Terrains/SouthPole
7+
8+
echo "Reading DEMs info..."
9+
for dem in $(ls $DEMS_PATH/*.tif); do
10+
dem_name_no_ext="${dem%.*}"
11+
gdalinfo $dem > $dem_name_no_ext.info
12+
python3 scripts/process_info.py --info_path $dem_name_no_ext.info --output_dir $DEMS_PATH --output_name $dem_name_no_ext
13+
python3 scripts/preprocess_dem.py --dem_path $dem --output_dir $DEMS_PATH --output_name $dem_name_no_ext.npy
14+
done
15+
echo "Finished extracting DEMs."
16+
17+
echo "Moving DEMs to $TGT_PATH..."
18+
mkdir -p $TGT_PATH
19+
for dem in $(ls $DEMS_PATH/*.npy); do
20+
dem_name_no_ext="${dem%.*}"
21+
dem_name_no_ext=$(basename $dem_name_no_ext)
22+
mkdir -p $TGT_PATH/$dem_name_no_ext
23+
mv $dem $TGT_PATH/$dem_name_no_ext/dem.npy
24+
mv $DEMS_PATH/$dem_name_no_ext.yaml $TGT_PATH/$dem_name_no_ext/dem.yaml
25+
done
26+
echo "Finished moving DEMs."
27+
28+
echo "Cleaning up..."
29+
rm -rm $DEMS_PATH
30+
echo "Finished cleanup."

scripts/install.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Pulls WorldBuilder
4+
git submodule init
5+
git submodule update
6+
7+
# Install GDAL
8+
sudo apt-get install gdal-bin
9+
sudo apt-get install libgdal-dev
10+
version=$(gdal-config --version)
11+
12+
# Install Python packages for Isaac Sim
13+
~/.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
14+
15+
# Download the assets from Google Drive
16+
gdown 1LfdJ8cogFU8Eid2EL-0bu9E383lftC_W
17+
unzip assets_v6.zip
18+
rm assets.zip
19+
20+
# Download the DEMs of the lunar southpole and format them.
21+
./scripts/get_dems.sh
22+
./scripts/extract_dems_override.sh
23+
# Get Ephemeris data
24+
./scripts/get_ephemeris_data.sh

0 commit comments

Comments
 (0)