Motion planning only works without collision detection

Typically: "How do I... ", "How can I... " questions
coppelia
Site Admin
Posts: 10381
Joined: 14 Dec 2012, 00:25

Re: Motion planning only works without collision detection

Post by coppelia »

you can create a bounding volume by using the convex hull of the gripper ([menu bar --> Add --> Convex hull of selection]). Make sure the hull is static, not respondable, but collidable. Then I would make it invisible (or rather put it into a hidden layer).
Then make all the objects in the gripper (except for the hull) non-collidable.

That should be it.

Cheers

lmustudent
Posts: 11
Joined: 03 Oct 2014, 16:55

Re: Motion planning only works without collision detection

Post by lmustudent »

Hi coppelia,

thanks for your help. I added some convex hulls and I think it might work like you suggested, but first, there is another problem to solve. Even when I make all parts of the gripper non-collidable there is still a collision detected in there, right from the beginning. Do you know any possible reasons? Is there a way to maybe just ignore exactly these collisions in path planning?

Here's the updated scene: https://www.dropbox.com/s/2ch0h1ftjje4k ... 2.ttt?dl=0

Cheers,

Richie

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

Re: Motion planning only works without collision detection

Post by coppelia »

Richie,

when you defined the robot collection, you also enabled the Collection overrides collidable, measurable, renderable, cuttable & detectable properties item. Uncheck that item in the collection dialog.

Then, I didn't find any convex hull of the gripper in the scene.

Cheers

lmustudent
Posts: 11
Joined: 03 Oct 2014, 16:55

Re: Motion planning only works without collision detection

Post by lmustudent »

Hi coppelia,
in the meantime I worked a lot on the project. I got everything to work with the convex hulls, that was a great idea. Now there are still some problems.
First, the Motion Planning Task does not choose exactly the same path every simulation. I think this is natural. But sometimes the gripper collides with the object for a short moment. Sometimes this is before even gripping, sometimes it is when the gripper is completely closed. The movement continues anyway. Where does this come from? Is this some kind of precision- problem in the motion planning? How can I solve it?

Then there is the biggest problem. It is hard for me to find possible targets for the gripper after grabbing the object. I tried many positions and orientations, but most of the time the simulation pauses after grabbing the object, because the 'traget2' is not reachable. Is this a problem in my algorithm?
What I tried was to pause simulation at the moment where the object was grabbed and then change some joint positions. Then I looked at the tip's position and orientation, because this should be a reachable configuration, right? But when I set the 'traget2' position and orientation to these values, it still won't move there. That makes me wonder, if position and orientation of the target is really the only problem that inhibits the robot to move. Do you have an idea? Is there a way to somehow calculate possible 'traget2'-positions and orientations? The process of changing them, starting the simulation again and being frustrated when it doesn't move is very time-consuming..

I uploaded the scene here: https://www.dropbox.com/s/fio9qo82wkboh ... 3.ttt?dl=0

I hope you can help me! Thanks in advance.

Cheers,

Richie

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

Re: Motion planning only works without collision detection

Post by coppelia »

Richie,

when doing path or motion planning, you will compute discret non-colliding configurations. What happens in-between those configurations is unknown. Have a look at this page, the second last image. To avoid this you can compute collision-free configurations that are closer to each other. This parameter is the stepSize of function simFindMpPath. Or you can switch to computing the minimum distance instead of the collision state in order to determine collision-free configurations. But this is slower (and comes with other problems too).

In your scene, the robot grabs the box, attaches it to a force/torque sensor, then moves up, then drops the box. I don't see what you want to achieve. In the testing phase, try to disable robot self-collision testing, or even robot-environment collision testing. This can give you important clues to what a path con't be found.

Cheers

lmustudent
Posts: 11
Joined: 03 Oct 2014, 16:55

Re: Motion planning only works without collision detection

Post by lmustudent »

Hi coppelia,

I changed the stepsize to 0.005, but still there is a collision with the object most of the time. Also, I turned on minimum distance, this made path finding impossible apparently. Is there anything else I could try?

The robot only moves up to drop the box again, because this is one of the only target2 it is able to move to. Actually, I would like to move the box to the other side of the robot. But it's hard for me to find Goal-configurations for the target2, that are possible to reach. That's what my question was about. Is there a way to check several configurations automatically or is it just trial and error for me?
I also did what you said and turned off collison detection for the path planning module, but this made no difference. I believe, the problem really lies in the orientation of the target.. Even though it actually should not be that hard to reach all those configurations..

Thanks for your help!

Cheers,

Richie

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

Re: Motion planning only works without collision detection

Post by coppelia »

Have a look at the demo scene motionPlanningDemo2.ttt: it illustrates how to search for a valid configuration, given a target pose. So in your case you could try to slightly randomly adjust the target pose, until it is reachable.

The quality of the results depends on many factors. One of them is the number of phase 1 nodes. Usually the more you have, the better the results. But it will also be slower. Try also to display the phase 1 nodes (in the motion planning dialog, check Visualize phase 1 nodes), that will give you an approximate idea of the reachable poses.

Cheers

Post Reply