Optimal Control of Robotic Grasping