# Understanding MoveIt! and OMPL more deeply

I wanted to know the actual mathematics behind the path planners MoveIt! uses for manipulators from OMPL. I tried to look into source codes but couldn't get enough details.

I wish to know:

1. How cost function is implemented, i.e., how path cost is calculated in configuration space. It can't be Euclidean distance I guess?! So what is it.
2. How Sampling is done. A sampler is called in the src files but i couldn't get the details. Is it done in configuration space or workspace or both can be done?
3. What is the exact pipeline? Like after sampling(depending on state space), is inverse kinematics implemented to get into configuration space or foward-kinematics is implemented to get into work space and such details. Which is the better option?

Actually I wish to implement my own algorithm (like some variation of RRT) without MoveIt!/OMPL hence it is important for me to know all the details.

Actually I wish to implement my own algorithm (like some variation of RRT) without MoveIt!/OMPL hence it is important for me to know all the details.

OMPL and MoveIt have a ton of features that are already implemented so you don't have to do that. However, that has made the software too large to quickly comprehend if you don't know about the underlying algorithms. Instead of learning more about their implementation and methods, I recommend you go directly to the original source!

Check out the textbook Planning Algorithms by Steven LaValle. The whole text is available online for free, but I have my own copy and it's literally sitting on my desk right now (lol). http://planning.cs.uiuc.edu/

### Simple RRT in python

On LaValle's website he has very simple RRT code that you can run in python right away. http://msl.cs.uiuc.edu/~lavalle/code.html http://msl.cs.uiuc.edu/~lavalle/sub/rrt.py

I would strongly encourage you to read the documentation of MoveIt!, especially the basic concepts to understand MoveIt! pipeline.

And the plugins page to understand which is the default planner and how it could be replaced by your own.

From the documentation of MoveIt!

MoveIt! is designed to work with many different types of planners, which is ideal for benchmarking improved planners against previous methods. Below is a list of planners that have been used with MoveIt!, in descending order of popularity/support within MoveIt!

Among them is OMPL, which offers a lots of planner implementations. Some are based on optimization some not, only the optimized one have cost function.

For sampling based planner, sampling can be random and homogeneous in the space or guided by some heuristics.

The choice of configuration space over work space, is mainly dependent of your application. For example if you have a manipulating arm you will be tempted to use work space so that you make sense of the plan intuitively. Some time it make more sense to plan in configuration space, because system constraint can be expressed more easily for example.

The OMPL webpage links every implementation to the theoretical papers and they also propose a guide for beginners in path planning, Open Motion Planning Library: A Primer.

• I have gone through it multiple times, still I will, once more. However I wish to know what is the mathematics, like what is the function they are minimizing for optimal path. They have mentioned the cost objectives but not the functions, which I tried to find in the library but could't. Jun 15, 2018 at 4:36