28 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
29 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
30 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
31 #include <MemoryX/interface/components/CommonStorageInterface.h>
35 #include <VirtualRobot/ManipulationObject.h>
36 #include <VirtualRobot/XML/SceneIO.h>
38 #include <Inventor/nodes/SoNode.h>
39 #include <Inventor/nodes/SoGroup.h>
40 #include <Inventor/nodes/SoSeparator.h>
41 #include <Inventor/nodes/SoImage.h>
42 #include <Inventor/nodes/SoFile.h>
43 #include <Inventor/nodes/SoTexture2.h>
44 #include <Inventor/nodes/SoTexture3.h>
60 defineRequiredProperty<std::string>(
"SceneFile",
"Name of Simox XML file")
61 .setCaseInsensitive(
true);
62 defineRequiredProperty<std::string>(
"SnapshotName",
"Name of snapshot (=MongoDB collection) to load objects to")
63 .setCaseInsensitive(
true);
64 defineRequiredProperty<std::string>(
"FilesDbName",
"Name of files database")
65 .setCaseInsensitive(
true);
83 return "SimoxSceneImporter";
85 void onInitComponent()
override;
86 void onConnectComponent()
override;
95 getConfigIdentifier()));
124 void getAbsoluteVisualizationFilenames(VirtualRobot::ObstaclePtr obstacle, std::vector<std::string>& absoluteFilenames);
133 void copyFilesToTempDir(
const std::vector<std::string>&
files,
const std::string& tmpPath,
const std::string& origPath, std::map<std::string, std::string>& newFilenameMapping);
140 void setNewVisualizationFilenames(VirtualRobot::ObstaclePtr obstacle, std::map<std::string, std::string>& newFilenames);
148 bool saveObstacleAsManipulationObject(VirtualRobot::ObstaclePtr
object,
const std::string& xmlFile,
const std::string& tmpPath);
177 template <
typename T>
178 int createObjectInstances(std::vector<T> obstacles, std::map<VirtualRobot::ObstaclePtr, ObjectInstanceBasePtr>& objectInstances);
191 void importObjectsIntoPriorKnowledge(std::map<VirtualRobot::ObstaclePtr, ObjectInstanceBasePtr>& objectInstances) ;
194 WorkingMemoryInterfacePrx memoryPrx;
195 ObjectInstanceMemorySegmentBasePrx objectInstancesMemoryPrx;
196 LongtermMemoryInterfacePrx longtermMemoryPrx;
197 PriorKnowledgeInterfacePrx priorKnowledgePrx;
198 PersistentObjectClassSegmentBasePrx classesSegmentPrx;
199 CommonStorageInterfacePrx dataBasePrx;
203 std::string filesDBName;
204 std::string sceneFile;
205 std::string snapshotName;
207 const std::string TEMPDIR;
208 const std::string LONGTERM_SNAPSHOT_PREFIX;