|
From: Mark M. <mm...@ri...> - 2017-10-05 20:07:20
|
You can create a Goal-derived class where the isSatisfied method always returns false. Use this in combination with the ompl::base::IterationTerminationCondition class to call solve. Next, set the goal you want and call solve again with ompl::base::plannerAlwaysTerminatingCondition(), which makes the planner terminate immediately. The internal data is not cleared between repeated calls to solve, so I think this might work. Mark > On Oct 5, 2017, at 11:55 AM, James Lee <JuH...@st...> wrote: > > Thanks for that Mark. Its not exactly what I needed, however. > > What I want to do is find a solution using a roadmap or branch that contains 1000 sample states. > But when I use the iteration termination condition to and set the value to, say 1000, the algorithm seems to only generate ~480 states. > I also want to perform benchmark test using set number of sample states, so ideally I don't want to pass the object through Planner::solve(). > > Is there another way? or do I need to hard code this? > > James > > From: Mark Moll <mar...@gm... <mailto:mar...@gm...>> on behalf of Mark Moll <mm...@ri... <mailto:mm...@ri...>> > Sent: Thursday, 5 October 2017 7:39:41 PM > To: James Lee > Cc: omp...@li... <mailto:omp...@li...>; Chanyeol Yoo; Robert Fitch > Subject: Re: [ompl-users] PRM and RRT sample bounds > > Hi James, > > Perhaps this is what you want: > ompl::base::IterationTerminationCondition > http://ompl.kavrakilab.org/classompl_1_1base_1_1IterationTerminationCondition.html <http://ompl.kavrakilab.org/classompl_1_1base_1_1IterationTerminationCondition.html> > ompl::base::IterationTerminationCondition Class Reference <http://ompl.kavrakilab.org/classompl_1_1base_1_1IterationTerminationCondition.html> > ompl.kavrakilab.org <http://ompl.kavrakilab.org/> > Public Member Functions IterationTerminationCondition (unsigned int numIterations) Construct a termination condition that can be evaluated numIterations times before ... > > You can pass an object of this type to Planner::solve(). > > Mark > > > >> On Oct 5, 2017, at 5:39 AM, James Lee <JuH...@st... <mailto:JuH...@st...>> wrote: >> >> Hi everyone, >> >> I am trying to implement PRM and RRT (and their respective variants) on OMPL. >> >> Is there a way to add a sample bound to these algorithms? For example, the roadmap or branch is grown until the 1000th sample has been generated, and uses said roadmap or branches to output a trajectory/path. >> >> Regards, >> >> James > > |