Open osrf-migration opened 7 years ago
Original comment by Agustin Alba Chicar (Bitbucket: agalbachicar).
@caguero I think that it will be pretty handy to have a pointer to the Waypoint in the manifold::rndf::RoadNode class. For example, if I want to search for a waypoint I will do something like:
#!c++
std::string strId = "1.2.3";
manifold::RNDFNode *node = rndfInfo->Info(strId);
if (node == nullptr) {
// The waypoint does not exist.
}
else {
// I can pick the waypoint pointer
manifold::rndf::Waypoint *waypoint = node->Waypoint();
}
I think this way, we join all the API points. Because from the graph, you get your desired vertex. And then you can get the reference to the object given the name of the vertex. For future discussion, I think that a common interface for grabbing the vertex metadata will be nice.
Original report (archived issue) by Agustin Alba Chicar (Bitbucket: agalbachicar).
These are two use cases where we will benefit from having the Waypoints and Lanes inside the Graph structure.
In both cases, we need to call some functions like the following:
To see these functions in context, please refer to the following link. As you can see we need to iterate through the whole structure of segments and/or zones to reach a lane.
I mention @andres_fortier so he is notified with the discussion.