Path planning module, saturation?

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

Path planning module, saturation?

Post by vick217 » 15 Nov 2013, 21:39

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
Site Admin
Posts: 7229
Joined: 14 Dec 2012, 00:25

Re: Path planning module, saturation?

Post by coppelia » 17 Nov 2013, 12:11

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?

Post by vick217 » 17 Nov 2013, 13:56

Dear Administrator,

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')
pathPlanningHandle=simGetPathPlanningHandle('PathPlanningTask0')

pathHandle1=simGetObjectHandle('Path0')
robotHandle1=simGetObjectHandle('StartConfiguration0')
targetHandle1=simGetObjectHandle('GoalConfiguration0')
pathPlanningHandle1=simGetPathPlanningHandle('PathPlanningTask1')

pathHandle2=simGetObjectHandle('Path1')
robotHandle2=simGetObjectHandle('StartConfiguration1')
targetHandle2=simGetObjectHandle('GoalConfiguration1')
pathPlanningHandle2=simGetPathPlanningHandle('PathPlanningTask2')

pathHandle3=simGetObjectHandle('Path2')
robotHandle3=simGetObjectHandle('StartConfiguration2')
targetHandle3=simGetObjectHandle('GoalConfiguration2')
pathPlanningHandle3=simGetPathPlanningHandle('PathPlanningTask3')

pathHandle4=simGetObjectHandle('Path3')
robotHandle4=simGetObjectHandle('StartConfiguration3')
targetHandle4=simGetObjectHandle('GoalConfiguration3')
pathPlanningHandle4=simGetPathPlanningHandle('PathPlanningTask4')

pathHandle5=simGetObjectHandle('Path4')
robotHandle5=simGetObjectHandle('StartConfiguration4')
targetHandle5=simGetObjectHandle('GoalConfiguration4')
pathPlanningHandle5=simGetPathPlanningHandle('PathPlanningTask5')

pathHandle6=simGetObjectHandle('Path5')
robotHandle6=simGetObjectHandle('StartConfiguration5')
targetHandle6=simGetObjectHandle('GoalConfiguration5')
pathPlanningHandle6=simGetPathPlanningHandle('PathPlanningTask6')

pathHandle7=simGetObjectHandle('Path6')
robotHandle7=simGetObjectHandle('StartConfiguration6')
targetHandle7=simGetObjectHandle('GoalConfiguration6')
pathPlanningHandle7=simGetPathPlanningHandle('PathPlanningTask7')
--execution code
if (btID==4) then
h=simDisplayDialog("Path planning task","Path planning task underway...",sim_dlgstyle_message,false)
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
https://drive.google.com/a/sheffield.ac ... sp=sharing

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

Re: Path planning module, saturation?

Post by coppelia » 18 Nov 2013, 10:32

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?

Post by formica » 12 Oct 2015, 15:22

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()
	while simGetSimulationState()~=sim_simulation_advancing_abouttostop do
		btID=simGetUIEventButton(dlgHandle)
		while (btID==-1)and(simGetSimulationState()~=sim_simulation_advancing_abouttostop) do
			simSwitchThread()
			btID=simGetUIEventButton(dlgHandle)
		end
		if (btID==3) then
			h=simDisplayDialog("Path planning task","Path planning task underway...",sim_dlgstyle_message,false)
			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)
			
			simFollowPath(robotHandle,pathHandle,3,0,1) -- follow the path
			simFollowPath(robotHandle0,pathHandle0,3,0,1) -- follow the path
		
			--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')
pathPlanningHandle=simGetPathPlanningHandle('PathPlanningTask')
pathPlanningHandle0=simGetPathPlanningHandle('PathPlanningTask0')

-- Here we execute the regular thread code:
res,err=pcall(threadFunction)
if not res then
	simAddStatusbarMessage('Lua runtime error: '..err)
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
Site Admin
Posts: 7229
Joined: 14 Dec 2012, 00:25

Re: Path planning module, saturation?

Post by coppelia » 13 Oct 2015, 07:44

Hello Formica,

can you post a minimalistic scene that illustrates the problem?

Cheers

Post Reply