Path planning for differential drive robot

Typically: "How do I... ", "How can I... " questions
Post Reply
fayyu
Posts: 10
Joined: 15 Aug 2017, 21:38

Path planning for differential drive robot

Post by fayyu »

Can we use OMPL for path planning of differential drive robot....??

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Path planning for differential drive robot

Post by fferri »

support for Dubins State Space has been recently added

fayyu
Posts: 10
Joined: 15 Aug 2017, 21:38

Re: Path planning for differential drive robot

Post by fayyu »

So how can i create the state space now..??

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Path planning for differential drive robot

Post by fferri »

pass sim_ompl_statespacetype_dubins as type when calling simOMPL.createStateSpace (the online docs are not updated yet, if you build the OMPL plugin yourself you will have updated documentation)

fayyu
Posts: 10
Joined: 15 Aug 2017, 21:38

Re: Path planning for differential drive robot

Post by fayyu »

Presently i am using OMPL path planning to plan the path for my drone. I am emulating a real world scene into the vrep and getting the path planning done using OMPL and then mapping those coordinates to the real world to move the drone likewise. It is working but sometimes the path seems bigger. So i basically need to find shortest path. But i couldnt find something like sim.getPathLength for OMPL path planning. How do i find path length in OMPL path planning ?

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Path planning for differential drive robot

Post by fferri »

Most of the OMPL algorithms are sampling based non-optimizing. Thus, the found path is longer than the optimal path[1].

When state steering is available (e.g. geometric motion planning), optimizing sampling-based algorithms (such as RRT*) can spend more time trying to find a better path, by connecting pairs of already expanded states. The found path is shorter, but still longer than the optimal path[1].

[1]: note that the optimal path cannot be found by sampling-based algorithms. Even with a complete algorithm, it would be theoretically impossible to find, as it is usually an NP-hard problem.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Path planning for differential drive robot

Post by fferri »

About finding the length of a path, you have to do it manually.

The path returned by OMPL is a sequence of states s[1], s[2], ..., s[n], where each state is a vector.
You have to define a function to measure the distance between two states, e.g. dist(a,b).
Then the path length is dist(s[1],s[2])+dist(s[2],s[3])+...+dist(s[n-1],s[n]).

How to implement the function dist(a,b) depends on the semantics of the state space. If the state space describes straight-line segments, then the distance can be just the euclidean distance, applied to the euclidean projection of a state.

Post Reply