Commit 92ae6280 authored by Test's avatar Test

update lib

parent b97551d6
......@@ -18,6 +18,10 @@ cd mongo-cxx-driver/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
sudo make -j4 && sudo make install
cd ../../
# set verify tool
echo "Setting up verify tool"
rm -rf ~/Documents/.galileo/verify_tool
ln -s $WS_DIR/src/ORB_SLAM2/tools/verify_tool ~/Documents/.galileo/verify_tool
# cp setting files
echo "cp setting files"
cd "$WS_DIR/src/ORB_SLAM2/Examples/ROS/ORB_SLAM2/Data"
......@@ -36,5 +40,13 @@ for setting_template in $(ls | grep _template.yaml); do
echo "copying setting file $setting_template to $setting"
cp -f $setting_template $setting
fi
check_res=$(cat $setting | grep "Camera.RGB")
if [ ! -z "$check_res" ]; then
# setting with dot, deprecated
echo "$setting is out of date, convert format"
sed -i -e 's/Camera./Camera_/g' $setting
sed -i -e 's/ORBextractor./ORBextractor_/g' $setting
fi
fi
done
No preview for this file type
No preview for this file type
#include <time.h>
#include "ORBVocabulary.h"
using namespace std;
bool load_as_text(ORB_SLAM2::ORBVocabulary* voc, const std::string infile) {
clock_t tStart = clock();
bool res = voc->loadFromTextFile(infile);
printf("Loading fom text: %.2fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
return res;
}
void load_as_xml(ORB_SLAM2::ORBVocabulary* voc, const std::string infile) {
clock_t tStart = clock();
voc->load(infile);
printf("Loading fom xml: %.2fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
}
void load_as_binary(ORB_SLAM2::ORBVocabulary* voc, const std::string infile) {
clock_t tStart = clock();
voc->loadFromBinaryFile(infile);
printf("Loading fom binary: %.2fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
}
void save_as_xml(ORB_SLAM2::ORBVocabulary* voc, const std::string outfile) {
clock_t tStart = clock();
voc->save(outfile);
printf("Saving as xml: %.2fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
}
void save_as_text(ORB_SLAM2::ORBVocabulary* voc, const std::string outfile) {
clock_t tStart = clock();
voc->saveToTextFile(outfile);
printf("Saving as text: %.2fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
}
void save_as_binary(ORB_SLAM2::ORBVocabulary* voc, const std::string outfile) {
clock_t tStart = clock();
voc->saveToBinaryFile(outfile);
printf("Saving as binary: %.2fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
}
int main(int argc, char **argv) {
cout << "BoW load/save benchmark" << endl;
ORB_SLAM2::ORBVocabulary* voc = new ORB_SLAM2::ORBVocabulary();
load_as_text(voc, "Vocabulary/ORBvoc.txt");
save_as_binary(voc, "Vocabulary/ORBvoc.bin");
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment