Giter Site home page Giter Site logo

Comments (6)

zkingston avatar zkingston commented on September 21, 2024 1

We should add the special case to make sure the two state case gets handled appropriately. Feel free to submit a PR to address this.

from ompl.

ChamzasKonstantinos avatar ChamzasKonstantinos commented on September 21, 2024

Hi @krakjack5 . The obstacle that you are inserting makes either the start and goal invalid or is an obstacle that is in between?

If either your start, goal is invalid then this function would not work as these are always assumed to be valid and part of the problem definition.

In the other case, which I guess is what you are asking, the object make the edge invalid, but not the endpoints.
Also in this case, I am not sure the path can be repaired since it only has 2 states, and you cannot change the start and goal as this would be a different motion planning problem.

Would calling interplolate() before you call checkAndRepair address your usecase?

from ompl.

krakjack5 avatar krakjack5 commented on September 21, 2024

Hi @ChamzasKonstantinos The way I have set up the test, the obstacle makes the edge invalid and both endpoints are valid. The checkAndRepair method computes a temp state to uniformly sample states around for repair. In the case of an invalid edge (path with only two states), if the for loop on line 234 used the stopping condition of "i <= n1", wouldn't it sample a new state around the goal with radius equal to the length of the edge? That will be able to repair the path as long as the obstacle is small enough.

Calling interpolate does work for my use case, but I was wondering why an edge is effectively treated as a special case.

Thanks!

from ompl.

ChamzasKonstantinos avatar ChamzasKonstantinos commented on September 21, 2024

Yeah, I don't think it is possible to repair a single edge, as the endpoints would be start, and goal and you cannot change them since that would be a different motion planning problem. I think what you are alluding to would be adding an extra waypoint(state) that goes away from the obstacle thus the repaired path would have 2 edges, but I think an underlying assumption of this function is that the number of waypoints(states) cannot change, thus it never add waypoints(states), it only substitutes them, see line 275.

from ompl.

krakjack5 avatar krakjack5 commented on September 21, 2024

@ChamzasKonstantinos Ok, that makes sense; I missed the fact that no new additional states are added during repair. Thank you for that clarification!

I have another sort of related question if you don't mind. I used interpolate and it works fine. However, I think my understanding of interpolate is not clear. I had set up the validity check such that interpolate added 42 states, thus making the total number of states 44. Just to try, I called interpolate again, and that made the total number of states equal to 224. I thought interpolate worked such that total number of states will be approximately similar to that used for validity checking. I did not understand why after calling interpolate the second time, the number of states jumped from 44 to 224.

Thanks!

from ompl.

krakjack5 avatar krakjack5 commented on September 21, 2024

Never mind my last comment about the interpolate method. The discrepancy was of my doing.

Coming back to the checkAndRepair method, I think the behavior in the case of a path with only two states is not intuitive in terms of the output returned by the method. The comments in PathGeometric.h state

"\brief Check if the path is valid. If it is not, attempts are made to fix the path by sampling around invalid states."

Clearly, for the case of a path with only two states, the path does not get checked for validity. I was wondering if it will be useful to update the comments accordingly. Another option may be to handle this as a separate case, similar to how the case of a path with only a single state is handled. In that case, the method will return a pair where pair.first = path.check() and pair.second = false.

I will appreciate any input!

from ompl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.