|
From: Kejia R. <kr...@ri...> - 2021-10-06 10:26:18
|
Hello Mark,
Thank you for your response and suggestions. I am currently trying to
implement my new planner class inheriting from the "RRT" class in python.
When I override the main "solve" method, I still want to use the
"RRT::Motion" class inside it. For example, in the main "solve" method of
my own planner, I want to do something like below:
class MyPlanner(oc.RRT):
...
def solve(self, time_limit):
...
motion = oc.RRT.Motion(self.si_)
...
However, in python, I cannot find this "RRT::Motion" class and cannot get
access to it. It looks like this class is defined as a protected inner
class under RRT in cpp, and thus I am not sure whether the python bindings
have generated correspondences even for these protected classes. So I am
sending the email to ask for your help. Could you please help provide some
suggestions on how I can access the "RRT::Motion" class or any other
protected attributes/methods in python? Thank you!
Best,
Kejia
On Sun, Sep 19, 2021 at 10:31 PM Mark Moll <mm...@ri...> wrote:
> Hi Keija,
>
> The nearest neighbors data structure may not be a tree and even if it is,
> its tree and the tree constructed by the RRT algorithm are not the same.
> There is an implicit tree structure in RRT defined using the
> RRT::Motion::parent pointers. You could need to do some additional
> bookkeeping (possibly by extending the RRT::Motion class) to keep track of
> a Motion instance’s depth and to loop over the leaves.
>
> Best,
>
> Mark
>
>
>
> On Sep 19, 2021, at 7:49 PM, Kejia Ren <kr...@ri...> wrote:
>
> Hello,
>
> We want to inherit from the RRT planner in OMPL to implement our own
> planner. Basically, I think we just need to overwrite the main solve()
> function since all other steps are the same. What we want to do inside the
> solve() function is, we want to retrieve the depth of the tree structure (I
> think it is an instance of the NearestNeighbors class inside RRT) and also
> want to decide where the leaf nodes are and evaluate the state of each leaf
> node. Below are a few lines of psuedocodes explaining what we want to do
> with it. But we are not sure whether we have access to the tree depth and
> whether the data structure used in RRT can decide where the leaf nodes are.
> So we are sending this email to ask for help. Could you please give some
> instructions or advice for how to do that? Thank you so much!
>
> solve():
> ...
> if tree.depth > 10:
> for n in leaf_nodes:
> evaluate(n -> state)
> ...
>
> Best,
> Kejia
> _______________________________________________
> ompl-users mailing list
> omp...@li...
> https://lists.sourceforge.net/lists/listinfo/ompl-users
>
>
>
|