Giter Site home page Giter Site logo

Comments (4)

mamoll avatar mamoll commented on May 24, 2024

Original comment by Mark Moll (Bitbucket: mamoll, GitHub: mamoll).


Dubins distance is not a metric. The default nearest neighbor data structure that RRT* uses assumes a metric, so you need to change the nearest neighbor data structure type:

#!c++

ompl::geometric::RRTStar* rrtstar = new ompl::geometric::RRTStar(setup.getSpaceInformation());
rrtstar->setNearestNeighbors<ompl::NearestNeighborsSqrtApprox>();
setup.setPlanner(ompl::base::PlannerPtr(rrtstar));

The reason you don't see the crash without your changes is that the default planner doesn't use a nearest neighbor structure.

See also http://ompl.kavrakilab.org/blog/?p=18. Let me know if this fixes things.

from ompl.

mamoll avatar mamoll commented on May 24, 2024

Original comment by Luis G. Torres (Bitbucket: [Luis Torres](https://bitbucket.org/Luis Torres), ).


That did the trick! Thanks for your help, Mark; I should've looked more closely at the documentation for the DubinsStateSpace.

from ompl.

mamoll avatar mamoll commented on May 24, 2024

Original comment by Luis G. Torres (Bitbucket: [Luis Torres](https://bitbucket.org/Luis Torres), ).


I needed to use a different nearest neighbors structure, since DubinsStateSpace's distance function does not define a proper metric. I wonder if there would be a way to indicate within a StateSpace class whether its distance function defines a metric, so that if the wrong nearest neighbor structure is used, an exception could be raised.

from ompl.

mamoll avatar mamoll commented on May 24, 2024

Original comment by Mark Moll (Bitbucket: mamoll, GitHub: mamoll).


Yes, something like that would be good to have. Better yet, the default nearest neighbor data structure could be automatically selected to be compatible with the properties of the state space. Let me think about that. Thanks for the suggestion.

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.