32 #include <RobotAPI/libraries/armem_locations/aron/Location.aron.generated.h> 
   37 #include <armarx/navigation/core/aron/Graph.aron.generated.h> 
   40 #include <SemanticObjectRelations/RelationGraph/RelationGraph.h> 
   41 #include <SemanticObjectRelations/Shapes/Shape.h> 
   54         return aron.locationID.providerSegmentName + 
"/" + 
aron.locationID.entityName;
 
   60         return not(
aron.locationID.providerSegmentName.empty() and
 
   61                    aron.locationID.entityName.empty());
 
   67         return _pose.has_value();
 
   88             << 
"Pose for vertex '" << 
getName() << 
"' must be in the global frame. Agent is '" 
   89             << _pose->agent << 
"'.";
 
   91             << 
"Pose for vertex '" << 
getName() << 
"' must be in the global frame. Frame is '" 
   92             << _pose->frame << 
"'.";
 
   93         return Pose(_pose->toEigen());
 
  100         ss << semrel::RelationGraph<VertexAttribs, EdgeAttribs, GraphAttribs>::strEdge(edge);
 
  102         ss << 
" cost " << edge.attrib().cost()
 
  103            << 
", type: " << 
static_cast<int>(edge.attrib().strategy) << 
" , has traj " 
  104            << edge.attrib().trajectory.has_value();
 
  118         std::vector<core::GraphPath>
 
  121                     std::set<core::Graph::VertexDescriptor> visited)
 
  123             using namespace core;
 
  126             if (visited.count(vertex.descriptor()) > 0)
 
  131             visited.insert(vertex.descriptor());
 
  133             std::vector<GraphPath> paths;
 
  135             paths.push_back({vertex}); 
 
  144             for (
const auto edge : vertex.inEdges())
 
  146                 std::vector<GraphPath> pathsToSource = 
findPathsTo(edge.source(), graph, visited);
 
  147                 for (
auto path : pathsToSource)
 
  154                     path.push_back(vertex);
 
  156                     paths.push_back(path);
 
  164     std::vector<core::GraphPath>
 
  167         std::set<Graph::VertexDescriptor> visited; 
 
  175         for (
auto vertex : 
bo.vertices())
 
  177             auto& 
v = dto.vertices.emplace_back(vertex.attrib().aron);
 
  178             v.vertexID = 
static_cast<long>(vertex.objectID());
 
  182         for (
auto edge : 
bo.edges())
 
  184             auto& e = dto.edges.emplace_back(edge.attrib().aron);
 
  185             e.sourceVertexID = 
static_cast<long>(edge.sourceObjectID());
 
  186             e.targetVertexID = 
static_cast<long>(edge.targetObjectID());
 
  191     core::Graph::ConstVertex
 
  194         auto vertices = graph.vertices(); 
 
  195         const auto vertexIt =
 
  196             std::find_if(vertices.begin(),
 
  198                          [&vertexName](
const core::Graph::ConstVertex& vertex) -> 
bool 
  199                          { return vertex.attrib().getName() == vertexName; });
 
  202             << 
"No vertex found with id `" << vertexName << 
"`";
 
  209         auto vertices = graph.vertices(); 
 
  210         return std::any_of(vertices.begin(),
 
  212                            [&vertexName](
const core::Graph::ConstVertex& vertex) -> 
bool 
  213                            { return vertex.attrib().getName() == vertexName; });
 
  219         auto graphIt = std::find_if(graphs.begin(),
 
  222                                     { return hasVertex(vertexName, graph); });
 
  225             << 
"No subgraph found for vertex `" << vertexName << 
"`";
 
  233         for (
const arondto::Vertex& vertex : dto.vertices)
 
  235             auto v = 
bo.addVertex(semrel::ShapeID(vertex.vertexID));
 
  236             v.attrib().aron = vertex;
 
  240         for (
const arondto::Edge& edge : dto.edges)
 
  242             auto e = 
bo.addEdge(semrel::ShapeID(edge.sourceVertexID),
 
  243                                 semrel::ShapeID(edge.targetVertexID));
 
  244             e.attrib().aron = edge;
 
  252         navigation::location::arondto::Location dto;
 
  253         dto.fromAron(locationData);
 
  257         vertex.attrib().setPose(pose);