Dear Developers,
I want to simulate the robot arm for pick-and-place task using IK and motion planning.
Now I am able to use IK and motion planning to move the arm from one location to another in a collision-free manner.
My question is that once the gripper grasps some object, then the original robot arm together with the grasped object should be considered as a whole when generating new collision-free path.
So far, i only know how to set illegal configuration check in the motion planning dialog before the simulation, them how can i write the code to automatically update the configuration check.
i.e when the robot arm has not reach the object, the configuration check is between the arm and all other collidable objects in the scene, once the robot arm grasp the object, the configuration check is between (arm+object) and all other collidable objects in the scene?
Thanks a lot!
Yours sincerely,
Juekun
Robot grasping task simulation
Re: Robot grasping task simulation
hello Juekun,
you can achieve this with following method:
you can achieve this with following method:
- Define a collection that includes all objects of your robot. For that, the collection should be defined as the tree starting at the base of the robot.
- In the motion planning dialog, select that collection as robot, under Illegal configuration check (phase2: robot-obstacles)
- if you add an object to the tree of your robot, that object will automatically be part of the robot collection you defined previously (the objects contained in a collection are automatically recomputed).
- While phase 1 collision-free nodes are computed only once (i.e. at simulation start or when you click Compute phase 1 nodes), phase 2 nodes will be computed each time you call simFindMpPath.
-
- Posts: 105
- Joined: 10 Oct 2013, 14:51
Re: Robot grasping task simulation
Hi Marc,
Thanks for your suggestion but it does not seem to work.
Here is the scene i created: https://drive.google.com/file/d/0B3-BbM ... sp=sharing
The task for the arm is to grasp the cylinder at position 1 and move it to position 2 and move it back to position 1.
If I incorporate the cylinder into the robot arm tree as you suggested, it doesnot work.
While i put the cylinder outside the tree, it succeeded 50% of the time, the other 50% include:
Do you have any resolution to problems I listed above?
Thanks a lot
Yours sincerely,
Juekun
Thanks for your suggestion but it does not seem to work.
Here is the scene i created: https://drive.google.com/file/d/0B3-BbM ... sp=sharing
The task for the arm is to grasp the cylinder at position 1 and move it to position 2 and move it back to position 1.
If I incorporate the cylinder into the robot arm tree as you suggested, it doesnot work.
While i put the cylinder outside the tree, it succeeded 50% of the time, the other 50% include:
- failed to grasp the cylinder firmly,
- happened to touch on the cylinder before grasping it even though collision checking is on,
- and takes a long time to generate a path.
Do you have any resolution to problems I listed above?
Thanks a lot
Yours sincerely,
Juekun
Re: Robot grasping task simulation
Hello Juekun,
following things could happen:
following things could happen:
- when you attach the cylinder to the manipulator, then then manipulator might already be in a colliding state (i.e. colliding with the table, since the cylinder touches the table). If this is the case, then no path will be found. To avoid this, you could create a smaller cylinder on top of the regular cylinder. The smaller cylinder will be used for collision testing, the other one will simply be used for physics).
- when a path is found, this means that the returned configurations do not collide. But when you travel from one configuration to the next, you might be colliding. It is thus important to very carefully adjust the stepSize, and also the precalculated phase 1 nodes (usually, the base joints should have more range subdivisions than the others, since a small movement of them might involve a large movement at the tip (and the tip could jump over an obstacle)
- instead of doing collision detection for motion planning, you could also use minimum distance calculation: that will be much slower, but you can guarantee a minimum distance to the obstacles.
-
- Posts: 105
- Joined: 10 Oct 2013, 14:51
Re: Robot grasping task simulation
Hi Marc,
Happy New Year!
I am not sure what you mean by saying "create a smaller cylinder on top of the regular cylinder", do you mean put the smaller one on the bottom of the regular or you mean the smaller one is the parent of the regular one?
Thanks a lot
Yours sincerely,
Juekun
Happy New Year!
I am not sure what you mean by saying "create a smaller cylinder on top of the regular cylinder", do you mean put the smaller one on the bottom of the regular or you mean the smaller one is the parent of the regular one?
Thanks a lot
Yours sincerely,
Juekun
Re: Robot grasping task simulation
A Happy New Year to you too!
what I mean is to attach a smaller cylinder to the current cylinder:
what I mean is to attach a smaller cylinder to the current cylinder:
- make the current cylinder non-collidable
- create a second, smaller cylinder.
- make it collidable and invisible.
- attach it to the current cylinder (i.e. the current cylinder will be the parent)
-
- Posts: 105
- Joined: 10 Oct 2013, 14:51
Re: Robot grasping task simulation
Hi Marc,
Thanks for your explanations!
It works for the case the robot arm grasp the cylinder and move it horizontally to another place but fails when the arm tries to move to another place while making it upside down.
Specifically, I attach the holder(invisible and collidable) to the cylinder (visible not collidable). the position of the holder is right beneath the cylinder. the arm can grasp the cylinder and move it horizontally from one place to another. But I am not sure why this works. Could you explain a bit?
But in the case where the arm move it while making it upside down, it succeed from place 1 to place 2 but fails from place 2 back to place 1, what i observed is that the cylinder slips from the arm when the arm tries to pick it up.
I think it has something to do with the holder I created. What do you think? How shall i fix it?
Maybe my description is not quite clear, you may refer to the scene file below if necessary.
https://drive.google.com/file/d/0B3-BbM ... sp=sharing
Thanks a lot
Yours sincerely
Juekun
Thanks for your explanations!
It works for the case the robot arm grasp the cylinder and move it horizontally to another place but fails when the arm tries to move to another place while making it upside down.
Specifically, I attach the holder(invisible and collidable) to the cylinder (visible not collidable). the position of the holder is right beneath the cylinder. the arm can grasp the cylinder and move it horizontally from one place to another. But I am not sure why this works. Could you explain a bit?
But in the case where the arm move it while making it upside down, it succeed from place 1 to place 2 but fails from place 2 back to place 1, what i observed is that the cylinder slips from the arm when the arm tries to pick it up.
I think it has something to do with the holder I created. What do you think? How shall i fix it?
Maybe my description is not quite clear, you may refer to the scene file below if necessary.
https://drive.google.com/file/d/0B3-BbM ... sp=sharing
Thanks a lot
Yours sincerely
Juekun
Re: Robot grasping task simulation
Hello Juekun,
you have a strange construcion for your cylinder: a static, respondable shape (Holder1) that is attached to a non-static, respondable shape (CylinderToBeGrasped).
Just use CylinderToBeGrasped, make it non-collidable, and attach a smaller invisible cylinder to it (e.g. just 2-4 mm smaller in length). The smaller cylinder should be collidable, static and non-respondable.
Basically the smaller cylinder will be the one that will be checked for collision detection for the motion planning algorithm. But the larger cylinder will be the one resting on the table and beeing grasped by the hand (the first is not involved in physics but in collision detection. The second is involved in physics but not in collision detection).
Cheers
you have a strange construcion for your cylinder: a static, respondable shape (Holder1) that is attached to a non-static, respondable shape (CylinderToBeGrasped).
Just use CylinderToBeGrasped, make it non-collidable, and attach a smaller invisible cylinder to it (e.g. just 2-4 mm smaller in length). The smaller cylinder should be collidable, static and non-respondable.
Basically the smaller cylinder will be the one that will be checked for collision detection for the motion planning algorithm. But the larger cylinder will be the one resting on the table and beeing grasped by the hand (the first is not involved in physics but in collision detection. The second is involved in physics but not in collision detection).
Cheers
-
- Posts: 105
- Joined: 10 Oct 2013, 14:51
Re: Robot grasping task simulation
Hi Marc,
Thanks a lot! The problem solved!
Yours sincerely,
juekun
Thanks a lot! The problem solved!
Yours sincerely,
juekun