support new import in memory for prior data
4 unresolved threads
4 unresolved threads
update import for new data format
Merge request reports
Activity
178 178 179 179 if (std::filesystem::is_directory(graph)) 180 180 { 181 // TODO: 181 armem::Commit c; 182 armem::MemoryID providerID = workingMemory().id(); 183 providerID.coreSegmentName = "Graph"; 184 providerID.providerSegmentName = providerName; 185 186 for (const auto& graphdir : std::filesystem::directory_iterator(graph)) changed this line in version 2 of the diff
187 { 188 const std::filesystem::path singleGraph = graphdir.path(); 189 if (std::filesystem::is_directory(singleGraph)) 190 { 191 navigation::core::arondto::Graph g; 192 193 for (const auto& subdir : std::filesystem::directory_iterator(singleGraph)) 194 { 195 const std::filesystem::path vertice = subdir.path(); 196 if (std::filesystem::is_regular_file(vertice)) 197 { 198 std::ifstream ifs(vertice); 199 const std::string content((std::istreambuf_iterator<char>(ifs)), (std::istreambuf_iterator<char>())); 200 201 // parse graph 202 nlohmann::json j = nlohmann::json::parse(content); 206 auto split = simox::alg::split(location, "/"); 207 ARMARX_CHECK_EQUAL(split.size(), 4); 208 209 armarx::navigation::core::arondto::Vertex v; 210 v.vertexID = id; 211 v.locationID.memoryName = split[0]; 212 v.locationID.coreSegmentName = split[1]; 213 v.locationID.providerSegmentName = split[2]; 214 v.locationID.entityName = split[3]; 215 v.locationID.timestamp = armem::Time::microSeconds(-1); 216 v.locationID.instanceIndex = 0; 217 218 g.vertices.push_back(v); 219 220 // load edges 221 std::vector<float> edges = j.at("outgoingEdges"); 220 // load edges 221 std::vector<float> edges = j.at("outgoingEdges"); 222 223 for (const auto edge_id : edges) 224 { 225 armarx::navigation::core::arondto::Edge e; 226 e.sourceVertexID = id; 227 e.targetVertexID = edge_id; 228 g.edges.push_back(e); 229 } 230 } 231 } 232 233 auto& up = c.add(); 234 up.confidence = 1.0; 235 up.timeCreated = armem::Time::now(); added 32 commits
-
b638760f...2d8354bc - 30 commits from branch
master
- 12951711 - Merge branch 'master' of https://gitlab.com/ArmarX/skills/navigation into fix/navigationAronData
- a25276c7 - commented code
-
b638760f...2d8354bc - 30 commits from branch
added 1 commit
- b56ad5d6 - added checks whether the key in the json exists
mentioned in commit 7ce367da
Please register or sign in to reply