Statistics
| Branch: | Revision:

root / rgbdslam / rgbd_benchmark / benchmark_evaluation.sh @ 9240aaa3

History | View | Annotate | Download (1.43 KB)

1
#!/bin/bash
2

    
3
echo $1 $2
4
if [[ "$1" == "" ]] || test  '!' -d "$2" ; then
5
  echo "Usage: $0 <feature-type> <directory-where-bagfiles-and-groundtruth-files-are>"
6
  echo "E.g.: $0 SURF ~/ros/rgbdslam/rgbd_benchmark/benchmark_data/"
7
  exit
8
fi
9
pushd `readlink -f $2` > /dev/null
10

    
11
export ROS_MASTER_URI=http://localhost:11381
12
roscore -p 11381&
13
sleep 1
14
#export DISPLAY=localhost:0.0
15
#This is for naming. Switching between SIFTGPU and (SURF, ORB) requires recompilation with adaption of CMakeLists.txt, line 6
16

    
17
rosparam set /rgbdslam/config/feature_detector_type $1
18
rosparam set /rgbdslam/config/feature_extractor_type $1
19
for bagfile in rgbd_dataset_freiburg1_*.bag ; do
20
  BASE_NAME=`basename $bagfile .bag` 
21
  DIRECTORY=$1/$BASE_NAME
22
  mkdir -p $DIRECTORY
23
  if grep -q Coordinate $DIRECTORY/*estimate.txt 2> /dev/null; then 
24
    echo There are already results for $BASE_NAME in $DIRECTORY. Will skip this bagfile
25
    continue #don't overwrite existing results
26
  fi
27
  echo Results for $BASE_NAME are stored in `readlink -f $DIRECTORY`
28
  rosparam set /rgbdslam/config/bagfile_name `readlink -f $bagfile`
29
  roslaunch rgbdslam settings_for_evaluation.launch >  $DIRECTORY/logfile 2>&1
30
  rosparam get /rgbdslam/config >>  $DIRECTORY/logfile 2>&1
31
  echo Finished processing $BASE_NAME
32

    
33
  #Move Result files, run evaluation routine
34
  mv ${bagfile}?* $DIRECTORY/
35
  cp ${BASE_NAME}-groundtruth.txt $DIRECTORY/
36
  #cp `readlink -f $0` $DIRECTORY/`basename $0`
37

    
38
done
39

    
40
popd > /dev/null