no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | tutorials:advanced:unreal [2019/05/16 13:58] – Added Roslaunch, Prerequisites, Installation, Performance hawkin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | This tutorial will introduce you to the '' | ||
+ | |||
+ | ==== Prerequisites ==== | ||
+ | This tutorial assumes that you've completed the [[tutorials: | ||
+ | |knowrob_robcog github]]. If it doesn' | ||
+ | The '' | ||
+ | |||
+ | === Roslaunch === | ||
+ | Launch a '' | ||
+ | <code bash> | ||
+ | $ roslaunch cram_bullet_world_tutorial world.launch | ||
+ | $ roslaunch json_prolog json_prolog.launch | ||
+ | $ roslisp_repl | ||
+ | </ | ||
+ | The bullet world is needed for visualization. The json_prolog node allows us to access information in KnowRob from CRAM. | ||
+ | |||
+ | ==== Initialization (within Emacs) ==== | ||
+ | TODO | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Importing new episode data into MongoDB and KnowRob(Additional information) ==== | ||
+ | In order for us to be able to query data for information, | ||
+ | The MongoDB contains all the poses of the objects, camera, hand and furniture of the episode. So the pose is read out from there. KnowRob takes care of everything else. It knows of all the object classes and instances used in the episodes. So in order to be able to use the data, we need to import it into MongoDB and KnowRob. | ||
+ | |||
+ | === MongoDB === | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | === KnowRob === | ||
+ | KnowRob needs to be able to find the .owl and .bson files. It's important to have a directory for all the Episodes. You can either have a look or download these [[ftp:// | ||
+ | |||
+ | === Performance === | ||
+ | Depending on how many collections your database has, it can get slow when quering for information. One way to make it faster, is to include an index over timestamp for all collections. One way to add this, is to install [[https:// | ||