## Path planning module, saturation?

Typically: "How do I... ", "How can I... " questions
vick217
Posts: 12
Joined: 26 Jun 2013, 18:27

### Path planning module, saturation?

Dear administrator, I am trying to generate path using the path planning module of V-REP for eight robots in a sequential way.

However, when I the simulator is about to finish, another path disappears and the path search continuous with the dissappering one, but then another dissappers and then it continous again and again.

When I stop the simulation, this is the error that shows me:
"Lua call error: [string "SCRIPT Central"]:152: Path planning object is not consistent anymore. (simSearchPath)"

Could you please, let me know if it is a problem with the time I give to calculate or another problem. I gave 15.000 in maximum calculation time within the module, is that in seconds or what units?

and for the time in the associated child, I gave 100 seconds, this is the command.
simSearchPath(pathPlanningHandle,100) -- search for a maximum of 100 seconds

Kind regards,
Victor

coppelia
Posts: 7543
Joined: 14 Dec 2012, 00:25

### Re: Path planning module, saturation?

Hello Victor,

When you look into the path planning dialog, you should see 8 path planning objects. One for each of your robots. In your child scripts associated with your robots, you have to make sure you are retrieving the handle of the correct path planning object (I suspect your 8 scripts are all accessing the same path planning object).
Have also a look at the demo scene practicalPathPlanningDemo.ttt.

Cheers

vick217
Posts: 12
Joined: 26 Jun 2013, 18:27

### Re: Path planning module, saturation?

I have a path planning module configuration, for each object. I also have the problem that some of the generated paths are crossing over the obstacle or do not have enough distance between objects and obstacles. My obstacle are all detectable, static, respondable, collidable and measurable. The path planning modules are as check robot-obstacle collison, with obstacles as all otehr collidable objects in the scene

I attack my code and an image, I hope the image is sent.

Kind regards,
Victor

--INITIALIZATION CODE
vehicleTarget1=simGetObjectHandle('youBot1_Target')
vehicleReference1=simGetObjectHandle('youBot1_Reference')
vehicleTarget2=simGetObjectHandle('youBot1_Target#0')
vehicleReference2=simGetObjectHandle('youBot1_Reference#0')
vehicleTarget3=simGetObjectHandle('youBot1_Target#1')
vehicleReference3=simGetObjectHandle('youBot1_Reference#1')
vehicleTarget4=simGetObjectHandle('youBot1_Target#2')
vehicleReference4=simGetObjectHandle('youBot1_Reference#2')
vehicleTarget5=simGetObjectHandle('youBot1_Target#3')
vehicleReference5=simGetObjectHandle('youBot1_Reference#3')
vehicleTarget6=simGetObjectHandle('youBot1_Target#4')
vehicleReference6=simGetObjectHandle('youBot1_Reference#4')
vehicleTarget7=simGetObjectHandle('youBot1_Target#5')
vehicleReference7=simGetObjectHandle('youBot1_Reference#5')
vehicleTarget8=simGetObjectHandle('youBot1_Target#6')
vehicleReference8=simGetObjectHandle('youBot1_Reference#6')

pathHandle=simGetObjectHandle('Path')
robotHandle=simGetObjectHandle('StartConfiguration')
targetHandle=simGetObjectHandle('GoalConfiguration')

pathHandle1=simGetObjectHandle('Path0')
robotHandle1=simGetObjectHandle('StartConfiguration0')
targetHandle1=simGetObjectHandle('GoalConfiguration0')

pathHandle2=simGetObjectHandle('Path1')
robotHandle2=simGetObjectHandle('StartConfiguration1')
targetHandle2=simGetObjectHandle('GoalConfiguration1')

pathHandle3=simGetObjectHandle('Path2')
robotHandle3=simGetObjectHandle('StartConfiguration2')
targetHandle3=simGetObjectHandle('GoalConfiguration2')

pathHandle4=simGetObjectHandle('Path3')
robotHandle4=simGetObjectHandle('StartConfiguration3')
targetHandle4=simGetObjectHandle('GoalConfiguration3')

pathHandle5=simGetObjectHandle('Path4')
robotHandle5=simGetObjectHandle('StartConfiguration4')
targetHandle5=simGetObjectHandle('GoalConfiguration4')

pathHandle6=simGetObjectHandle('Path5')
robotHandle6=simGetObjectHandle('StartConfiguration5')
targetHandle6=simGetObjectHandle('GoalConfiguration5')

pathHandle7=simGetObjectHandle('Path6')
robotHandle7=simGetObjectHandle('StartConfiguration6')
targetHandle7=simGetObjectHandle('GoalConfiguration6')
--execution code
if (btID==4) then
simSearchPath(pathPlanningHandle,50) -- search for a maximum of 100 seconds
simSearchPath(pathPlanningHandle1,50) -- search for a maximum of 100 seconds
simSearchPath(pathPlanningHandle2,50) -- search for a maximum of 100 seconds
simSearchPath(pathPlanningHandle3,50) -- search for a maximum of 100 seconds
simSearchPath(pathPlanningHandle4,50) -- search for a maximum of 100 seconds
simSearchPath(pathPlanningHandle5,50) -- search for a maximum of 100 seconds
simSearchPath(pathPlanningHandle6,50) -- search for a maximum of 100 seconds
simSearchPath(pathPlanningHandle7,50) -- search for a maximum of 100 seconds
simEndDialog(h)
end

image of the path planning module configurations
[img][C:\Documents and Settings\uos\My Documents\My Pictures\untitled]

In goggle drive

coppelia
Posts: 7543
Joined: 14 Dec 2012, 00:25

### Re: Path planning module, saturation?

please post your scene, otherwise it is too troublesome to search for the problem.

Cheers

formica
Posts: 52
Joined: 13 Mar 2013, 12:13

### Re: Path planning module, saturation?

UP
Exactly the same problem here.
I would like to perform different Path Planning task, for different robot.
I have different path planning object handles.

Code: Select all

threadFunction=function()
btID=simGetUIEventButton(dlgHandle)
btID=simGetUIEventButton(dlgHandle)
end
if (btID==3) then
simSearchPath(pathPlanningHandle,15) -- search for a maximum of 5 seconds
simSearchPath(pathPlanningHandle0,15) -- search for a maximum of 5 seconds
simEndDialog(h)
end
if (btID==4) then
initialPosition=simGetObjectPosition(robotHandle,-1)
initialPosition0=simGetObjectPosition(robotHandle0,-1)

initialOrientation=simGetObjectOrientation(robotHandle,-1)
initialOrientation0=simGetObjectOrientation(robotHandle0,-1)

--simSetObjectPosition(robotHandle,-1,initialPosition)
--simSetObjectOrientation(robotHandle,-1,initialOrientation)
end
simGetUIEventButton(dlgHandle) -- discard any button press that occured during the search or the movement
end
end

-- Initialization:
pathHandle=simGetObjectHandle('Path')
pathHandle0=simGetObjectHandle('Path#0')
robotHandle=simGetObjectHandle('StartConfiguration')
robotHandle0=simGetObjectHandle('StartConfiguration#0')
targetHandle=simGetObjectHandle('GoalConfiguration')
targetHandle0=simGetObjectHandle('GoalConfiguration#0')
dlgHandle=simGetUIHandle('PathPlanningDlg')

-- Here we execute the regular thread code:
if not res then
end

-- Clean-up:


The first planning task is correctly done. But the second planning task returns a path that cross over obstacles (all of them are static, detectable, respondable, collidable).
Any idea?

coppelia