Skip to content

Commit

Permalink
[FIX] minimum working process_data.sh script?
Browse files Browse the repository at this point in the history
  • Loading branch information
hollydinkel committed Mar 25, 2024
1 parent 455bffe commit 35faddb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion astrobee_data_processing_scripts/create_cameras_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
images_dir = f'./data/{args.date}/{args.robot}/bayer/survey{args.survey}'
poses_dir = f'./data/{args.date}/{args.robot}/pose/survey{args.survey}'
poses = sorted(os.listdir(poses_dir))
fastcd_data_dir = f'./fast_change_detection/example/dataset/{args.date}_{args.robot}_survey{args.survey}'
fastcd_data_dir = f'./fast_change_detection/data/{args.date}-{args.robot}-survey{args.survey}'

try: os.mkdir(fastcd_data_dir)
except FileExistsError:
Expand Down
26 changes: 13 additions & 13 deletions process_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ export DATE=20230419
export ROBOT=bsharp
source $ASTROBEE/devel/setup.bash

# mkdir $DATA
mkdir $DATA

# # Install dependencies
# apt-get update
# apt-get install -y python3-pip
# pip install numpy --upgrade
# pip install gdown pyquaternion pandas
# Install dependencies
apt-get update
apt-get install -y python3-pip
pip install numpy --upgrade
pip install gdown pyquaternion pandas

# # Download data
# cd $DATA && gdown https://drive.google.com/uc?id=1qNCRl9XceINrHLFUp4pBti9I4oJO2zf1
# unzip data.zip
# cp data/ ../
# rm -rf data/
# rm $DATA/data.zip
# Download data
cd $DATA && gdown https://drive.google.com/uc?id=1qNCRl9XceINrHLFUp4pBti9I4oJO2zf1
unzip data.zip
cp data/ ../
rm -rf data/
rm $DATA/data.zip

for SURVEY_NUMBER in 2 3 4
do
Expand All @@ -33,6 +33,6 @@ do
rm -rf $DATA/$DATE/$ROBOT/bayer/survey$SURVEY/0 $DATA/$DATE/$ROBOT/bayer/survey$SURVEY/invalid $DATA/$DATE/$ROBOT/bayer/survey$SURVEY/rotation
cd $DATA && python3 $ASTROBEE_CHANGE_DETECTION/astrobee_data_processing_scripts/process_sequential_poses.py $SURVEY $DATE $ROBOT && rm *.txt
cd $DATA/$DATE/$ROBOT/bayer/survey$SURVEY && ls -v | nl -v 0 | while read n f; do mv -n "$f" "Image$n.JPG"; done
cp -r $DATA/$DATE/$ROBOT/bayer/survey$SURVEY $FASTCD/
mkdir -p $FASTCD/data/$DATE-$ROBOT-survey$SURVEY/images
cd $ASTROBEE_CHANGE_DETECTION && python3 astrobee_data_processing_scripts/create_cameras_xml.py $SURVEY $DATE $ROBOT
done

0 comments on commit 35faddb

Please sign in to comment.