no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | tutorials:advanced:unreal [2019/04/15 13:59] – created. Moved MongoDB instructions from json-prolog tutorial hawkin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== Importing new episode data into MongoDB (Additional information) ==== | ||
+ | If you record data in the Virtual Reality using [[http:// | ||
+ | '' | ||
+ | '' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | Each episode gets a random ID generated, therefore replace ID here with whatever your data's ID is. In order to be able to access this data in KnowRob, we need to load it into our local MongoDB, since this is where all data is kept for KnowRob to access. Unfortunately, | ||
+ | <code bash> | ||
+ | $ mkdir split | ||
+ | $ cd split | ||
+ | $ cat ../ | ||
+ | </ | ||
+ | |||
+ | We create a new directory called '' | ||
+ | After this, you should see many files in your split directory, named '' | ||
+ | Now we can import the files onto the databse. | ||
+ | |||
+ | <code bash> | ||
+ | $ mongoimport --db DB-NAME --collection COLLECTION-NAME | ||
+ | </ | ||
+ | |||
+ | example: | ||
+ | <code bash> | ||
+ | $ mongoimport --db Own-Episodes_set-clean-table --collection RawData_cUCM | ||
+ | </ | ||
+ | |||
+ | I keep everything in one database, and name the collection according to the RawData_ID name, in order to not forget what is what. You can name it however you like. IF you consider importing all the files individually fairly tedious, you can write a script for it. If you do, let us know. Didn't get around to do that yet. | ||
+ | Now we can create a '' | ||
+ | |||
+ | <code bash> | ||
+ | $ mongodump --db DB-NAME --collection COLLECTION-NAME | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | $ mongodump --db Own-Episodes_set-clean-table --collection RawData_cUCM | ||
+ | </ | ||
+ | Then you get a '' | ||
+ | |||
+ | After this, you can just look at how the other episodes and their directories are structured, and create the directories for your data the same way. | ||
+ | |||
+ | Should you ever for some reason need to directly import a '' | ||
+ | <code bash> | ||
+ | $ mongorestore -d DB-NAME -c COLLECTION-NAME FILE-NAME.bson | ||
+ | </ | ||
+ | <code bash> | ||
+ | $ mongorestore -d Own-Episodes_set-clean-table -c RawData_qtzg RawData_qtzg.bson | ||
+ | </ |