Tue 21. Oct 2014, 13:50
proprentnerl wrote:Sometimes when grasping an object after moving the robot it happens, that the object is catapulted out of the gripper
thanks for sending the logfile. from the logfile and your video its clearly visible how one of the gripper-fingers violate its joint-condition. (its a gazebo prismatic joint which is implemented as a bullet btSliderConstraint)
this should not happen in a perfect physics simulation. our simulation is certainly not perfect. to make such grasping situations behave more realistic we enabled a modified version of gazebo's "GripperHack".
this gripper hack simply observes contacts between gripper fingers and objects in the scene. when an object has contact to both gripper fingers for more than 0.25 simulated seconds and there is no relative velocity between gripper and that object, and there is a gripper-force of atleast 5N then the hack is enabled and a new "fixed joint" is added to the physics simulation which holds/fixes the objects pose relative to the gripper.
this fixed joint is automatically removed when there is less than 5N of gripping force.
this gripper hack did not activate in your case because after closing the gripper fingers you immediately started moving the robot and this caused a movement of the cube relative to the gripper (because of the cube's inertia and the limited friction between cube and gripper fingers).
without that activated gripper hack there was only the relatively high gripping force of 48N (which you specified in your grip-stop-condition) that should keep the cube between the fingers.
this high-forces, many-contacts, multiple objects & joint-constraints situation is problematic for physics engines like bullet with our step-times, masses & frictions.
you should avoid such situations (atleast in this simulator).
for the gripper hack to work you should wait atleast 0.25 simulated seconds after closing the gripper fingers and while having atleast 5N of gripping force.
i suggest this procedure:
- close gripper fingers with a gripper stop condition of 10N (once the gripper hack is active the actual mass of the object is meaningless for the grasp to be stable...)
- wait atleast 0.5 simulated seconds
- lift the object / start moving the arm...
please report back if this procedure solved those problems.