ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You are saying that you are using GripperActionCommand, but this controles only 1 joint but your gripper has 2... I m not familiar with the "jennifer's grasp plugin". I tried some joint movement clone plugins but they didnt work very well (arm explodes xD).
My experience tells these things:
1- You cannot grasp objects with position hardware interface on Gazebo. The physics (friction etc.) just dont work...
2- Make sure you have a limited effort on the griper joints (effort_limit on URDF). That explosion seems to be because of that. But, it can be because of the position hardware interface as well. Your gripper fingers are trying to teleport inside the object. The arm explosions happens because of bad relations between link inertias/mass, joint efforts and pid values of controllers.
Solutions? Well... You have 2 options:
1- Change ALL your joints (arm and gripper) hardware interfaces to EffortHardwareInterface, use effort_controllers/JointTrajecoryController and GripperActionCommand should work anyway (i think). But remember... You will need to tune the PID parameters of all joint controllers :/. It can be painful. If you consider this adventure, i suggest you to use the rqt_reconfigure + rqt_plot + rqt_publisher to make it. The effort limits on your joints need to be in order with the Mass of you links... I suggest you to start low and increase if you see that your joints cant move. Make sure that your Inertia link tags are realistic... Trust me, gazebo will know when you try to fake it xD Use the .world files of gazebo to place the scene objects, there you can write whit SDF the description of you objects. Set the surface friction of the object to VERY HIGH and the mass to a low value. Good luck!
2- Forget about a realistic grasp. Make a plugin/controller that detects when your gripper is grasping something. Use the contact_points you see in your video, they are being published on a gazebo topic. When you detect some contact points between "inside the fingers" and an object, create a fixed joint between a finger and the object and stop your controller from closing more. The piece will never fall. Delete the fixed joint when you need to release the object. The main challenge here is to identify the moment you need to create the fixed joint. Because you will observe impossible grasp situations made real xD
I may publish a video of my arm grasping an object. Good luck! I hope i helped someone.