## Path Planning without using calculation modules

Typically: "How do I... ", "How can I... " questions
aiman
Posts: 7
Joined: 14 Nov 2014, 03:23

### Path Planning without using calculation modules

Hi, I have a few queries and hope that you can clear my doubts.
1) Can I plan a path without using the path planning calculation module?
2) It is said that V-rep uses RRT-connect algorithm. Can A* algorithm be used in V-rep?
3) Can I plan a path which follows the Manhattan distance heuristic where a robot can only move horizontally and vertically, and not diagonally, with and without the calculation modules? As shown in the figure below.

Hope that you can give some example scenes for me to work on.
Thank you.

coppelia
Site Admin
Posts: 7267
Joined: 14 Dec 2012, 00:25

### Re: Path Planning without using calculation modules

Hello,

to your questions:

1) Yes, you can use whatever algorithm that you wish. You will however have to use V-REP's collision detection / distance calculation module to figure out where an obstacle is located. Or you can also use proximity sensors (or even vision sensors) to do that obstacle detection task.

2) Yes, see point 1)

3) Yes, you can do that. But again, you will have to implement that algorithm yourself. I would do this in various steps: a) sweep the floor with a proximity sensor (or vision sensor) in a regular grid to detect which cell is free, and which cell is an obstacle. b) Figure out where in the cells your robot is located. c) assign some weights to each cell depending on the obstacles and your robot's location (and based on your specific algorithm). d) Seach a valid path in the cells.

Cheers

Eman
Posts: 6
Joined: 07 Feb 2015, 09:12

### Re: Path Planning without using calculation modules

Hello dear,

"you mentioned in point 3C : c) assign some weights to each cell depending on the obstacles and your robot's location"

can you explain how can I add a weight for each cell in the floor? In my case I want the floor to hold coordinates of (x,y)

Eric
Posts: 186
Joined: 11 Feb 2013, 16:39

### Re: Path Planning without using calculation modules

Hi

" assign some weights to each cell depending on the obstacles and your robot's location"
means having a (m,n) table in your algorithm, having a weighting value in it for each cells, where m and n are the number of cells in x and y respectively.
Not sure what you want to achieve but usually you want to avoid your planner to consider path on obstacles.
Now, when you say you want to use the Manhattan distance as a heuristic , i guess it s to get the distance remaining to the goal for an A* algorithm, and I believe you can easily calculate the Manhattan distance from the grid where your robot is to the goal, by filling up an other array (or maybe the euclidean distance can be used as a heuristic for simplicity sake?)

cheers

Eric

Eman
Posts: 6
Joined: 07 Feb 2015, 09:12

### Re: Path Planning without using calculation modules

Hello dear Eric,

Thanks for your answer regarding the map .. much appreciated

1.But how to link between the map that I will design by my code and the map that is illustrated in the simulator?

2. One more question dear if you don't mind :: after running my path planning algorithm the result is going to be series of points that the robot should follow to reach the target (a path)

-- for example (1,4),(1,5),(1,6).(1,7) : do you have any idea how can I let the robot move through this path? is there a way to save all of these points as a path to be followed by the robot ? or I should let the robot check point by point to take a decision ?

Eric
Posts: 186
Joined: 11 Feb 2013, 16:39

### Re: Path Planning without using calculation modules

Hi

The map you get from the simulation using point 1 of coppelia s answer is the one that will create the image of the map in your code... now if you want to create a map in v-rep according to the one you generate in your code it s gonna be a bit more complex to implement ( not that much though)

for the path following, well you can simply control your robot to head toward the next target point of the list and check when it come close enough to it in order to set a next target (i.e. the next point on the list along the path)
also i guess it is possible to save a path based on this set of points... i guess simCreatePath will do the trick, but the point required for the function are the control point which is a bit different than points inside the path but somehow convertible...

cheers

Eric

Eman
Posts: 6
Joined: 07 Feb 2015, 09:12

### Re: Path Planning without using calculation modules

Dear Eric,
thanks for your answer but this is what I want :

"now if you want to create a map in v-rep according to the one you generate in your code it s gonna be a bit more complex to implement ( not that much though) "

can you guide me how can I do this because I need a fixed map and to be the same with the one that I generate in my code (Lua script)

Let's say this is the map that I want to implement ?

the range of x from 2,4
the range of y from 0,2

Eric
Posts: 186
Joined: 11 Feb 2013, 16:39

### Re: Path Planning without using calculation modules

sorry I don t understand what you want to achieve