P3DX OMPL plugin path plan difficult

Typically: "How do I... ", "How can I... " questions
Post Reply
amnlima
Posts: 4
Joined: 19 Jan 2016, 11:33

P3DX OMPL plugin path plan difficult

Post by amnlima »

Dear V-REPians

I am trying to use the OMPL plugin. I started with a P3DX robot but without success. Thus, I move to a cuboid with the same dimensions of a P3DX, and programmatically (Lua script) it worked as I expected. Please click here
(https://www.dropbox.com/s/p1fwxc1cqz9w7 ... n.ttt?dl=0) to access my test scene. Would you please give me any hint on how to do the same with a P3DX?

Best regards.

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

Re: P3DX OMPL plugin path plan difficult

Post by coppelia »

With a robot, your approach could be similar, in order o generate the path. But once you have the path, you are in charge of generating the correct wheel velocities in order to follow it (e.g. turn left a bit faster than right --> robot turns right, turn right a bit faster than left --> robot turns left). Your'll have to write that controller.

Cheers

amnlima
Posts: 4
Joined: 19 Jan 2016, 11:33

Re: P3DX OMPL plugin path plan difficult

Post by amnlima »

Dear Sir/Madam

Thanks for your reply. In the meantime, I found a solution for my P3DX path planning difficulty. Click here to see the answer I managed to find out:

https://www.dropbox.com/s/7cke642kv95gp ... X.ttt?dl=0

I still do not know how to use the OMPL plugin when I replace the cuboid with a P3DX. Thus, I used a cuboid to solve the path planning problem. After getting the path, I removed the cuboid from the scene and spawned a P3DX and place at the position (pose) where cuboid was. Thus, my question remains unanswered: How to solve the path planning problem when there is a P3DX (instead of cuboid) in the scene.

Best regards

AMNLima

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

Re: P3DX OMPL plugin path plan difficult

Post by coppelia »

I would use a cylinder that is, say, 20% larger than the robot for the path planning task. Then have the robot follow the path. The situation would look a bit different if you had a holonomic robot, and you could perfectly follow the path, including the rotation at all time.

Cheers

amnlima
Posts: 4
Joined: 19 Jan 2016, 11:33

Re: P3DX OMPL plugin path plan difficult

Post by amnlima »

Dear COPPELIA-ian

Many thanks for your help. Problem solved, please find here the scene with a solution that suits to my needs:

https://www.dropbox.com/s/6kf2v6ngslbtd ... L.ttt?dl=0

As you will see the control code runs under "sysCall_actuation". I the near future I will add some code for determining the moving obstacles based on the readings of, for instance, a laser range finder or an ultrasonic array. In this latter case, it is mandatory to use "sysCall_sensing", or I can let all the code running under "sysCall_actuation"?

Best regards

AMNLima

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

Re: P3DX OMPL plugin path plan difficult

Post by coppelia »

It is not required to have your code in the sensing section. But depending on what you are doing, you could then be reading the distance just before the robot moves, which technically is the distance from previous simulation frame.

Read more here.

Cheers

Post Reply