25 #include <VirtualRobot/ManipulationObject.h>
26 #include <VirtualRobot/XML/SceneIO.h>
31 #include <Inventor/nodes/SoFile.h>
32 #include <Inventor/nodes/SoGroup.h>
33 #include <Inventor/nodes/SoImage.h>
34 #include <Inventor/nodes/SoNode.h>
35 #include <Inventor/nodes/SoSeparator.h>
36 #include <Inventor/nodes/SoTexture2.h>
37 #include <Inventor/nodes/SoTexture3.h>
40 #include <MemoryX/interface/components/CommonStorageInterface.h>
41 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
42 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
43 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
57 defineRequiredProperty<std::string>(
"SceneFile",
"Name of Simox XML file")
58 .setCaseInsensitive(
true);
59 defineRequiredProperty<std::string>(
60 "SnapshotName",
"Name of snapshot (=MongoDB collection) to load objects to")
61 .setCaseInsensitive(
true);
62 defineRequiredProperty<std::string>(
"FilesDbName",
"Name of files database")
63 .setCaseInsensitive(
true);
81 return "SimoxSceneImporter";
84 void onInitComponent()
override;
85 void onConnectComponent()
override;
123 void getAbsoluteVisualizationFilenames(VirtualRobot::ObstaclePtr obstacle,
124 std::vector<std::string>& absoluteFilenames);
133 void copyFilesToTempDir(
const std::vector<std::string>&
files,
134 const std::string& tmpPath,
135 const std::string& origPath,
136 std::map<std::string, std::string>& newFilenameMapping);
143 void setNewVisualizationFilenames(VirtualRobot::ObstaclePtr obstacle,
144 std::map<std::string, std::string>& newFilenames);
152 bool saveObstacleAsManipulationObject(VirtualRobot::ObstaclePtr
object,
153 const std::string& xmlFile,
154 const std::string& tmpPath);
184 template <
typename T>
185 int createObjectInstances(
186 std::vector<T> obstacles,
187 std::map<VirtualRobot::ObstaclePtr, ObjectInstanceBasePtr>& objectInstances);
200 void importObjectsIntoPriorKnowledge(
201 std::map<VirtualRobot::ObstaclePtr, ObjectInstanceBasePtr>& objectInstances);
204 WorkingMemoryInterfacePrx memoryPrx;
205 ObjectInstanceMemorySegmentBasePrx objectInstancesMemoryPrx;
206 LongtermMemoryInterfacePrx longtermMemoryPrx;
207 PriorKnowledgeInterfacePrx priorKnowledgePrx;
208 PersistentObjectClassSegmentBasePrx classesSegmentPrx;
209 CommonStorageInterfacePrx dataBasePrx;
213 std::string filesDBName;
214 std::string sceneFile;
215 std::string snapshotName;
217 const std::string TEMPDIR;
218 const std::string LONGTERM_SNAPSHOT_PREFIX;