At the moment, a grasp is detected to have been finalized when the fingers are not moving any more. This should be sufficient in most cases and is good enough for testing purposes.
However it is possible that the grasp is actually not yet finalized, and the execution then goes on to lift the object, which is not held yet. For example, the Gazebo grasp plugin may "lag behind" a little with its attachment, due to its nature of establishing a grasp only after contacts have existed for a little while. Then, when the execution proceeds, the object slips out of the grip.
This doesn't happen very often though.
A "dirty" hack would be to send out a ROS message from the gazebo plugin to signal the grasp to be finished. However this is essentially a force feedback task, so it should be properly wrapped into such, so that it can be handled by the grasp execution on a general level supporting all sorts of force-feedback mechanisms.
At the moment, a grasp is detected to have been finalized when the fingers are not moving any more. This should be sufficient in most cases and is good enough for testing purposes. However it is possible that the grasp is actually not yet finalized, and the execution then goes on to lift the object, which is not held yet. For example, the Gazebo grasp plugin may "lag behind" a little with its attachment, due to its nature of establishing a grasp only after contacts have existed for a little while. Then, when the execution proceeds, the object slips out of the grip. This doesn't happen very often though.
A "dirty" hack would be to send out a ROS message from the gazebo plugin to signal the grasp to be finished. However this is essentially a force feedback task, so it should be properly wrapped into such, so that it can be handled by the grasp execution on a general level supporting all sorts of force-feedback mechanisms.