From: Ryan L. <rl...@ri...> - 2013-01-24 14:25:01
|
Hello Dan, All of the planners in OMPL are constructed to be agnostic of the state space planned in. Therefore, it isn't easy to get at any particular state component inside of a planner without knowing explicitly the state space you are planning in. For the PRM, the State pointers are stored in a member variable property_map called stateProperty_ . If you know the StateSpace type, you can cast these to your type and then extract the state components. You can also externally retrieve a copy of the data structure constructed by a planner using the getPlannerData method. The structure returned allows you to explicitly query the vertex data, of which a State* is a member that you can cast to your particular StateSpace as you would, for example, in a StateValidityChecker. Ryan On Thu, Jan 24, 2013 at 6:59 AM, Magazzeni, Daniele < dan...@kc...> wrote: > Dear OMPL users, > > I'm using the RoadMap algorithm in a SE3StateSpace. > > I need to access the (x,y,z) coordinates of each vertex in the generated > RoadMap, but I'm struggling with that. > > I've got: > > planner->as<og::PRM>()->growRoadmap(1.0); > > Then I can use a property_map to get the vertex index, in this way: > > typedef b::property_map<Graph, b::vertex_index_t>::type IndexMap; > IndexMap index = get(b::vertex_index, g); > > Is there anything similar to access the content of the vertex, i.e. the > coordinates x,y,z ? > > Thank you very much! > > Best regards, > Dan > > > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d > _______________________________________________ > ompl-users mailing list > omp...@li... > https://lists.sourceforge.net/lists/listinfo/ompl-users > > |