I am using ompl for path planning in 3D. Please guide how to get goal position (x, y, z) out of goal pointer received from this line.
const ob::Goal *Goalptr = pdef->getGoal().get();
where pdef
is problem definition. and ob
is ompl::base
Path planner is planning paths but I can't get this goal out of it.
How should I do something like this:
x= Goalptr[0];
y= Goalptr[1];
z= Goalptr[2];
Or should i cast this Goalptr
in some other type first and then do that. Pls help.
So this post helped me to solve the problem. I used this code to get goal position.
Then we get goal position (x,y,z) in (reals[0], reals1, reals[2]).
Thanks Christopher Oezbek and others who tried.