justagist / franka_ros_interface

A ROS/Python API for controlling and managing the Franka Emika Panda robot (real and simulated).
http://justagist.github.io/franka_ros_interface
Apache License 2.0
169 stars 59 forks source link

Values of width and force in grasp #36

Open ascane opened 3 years ago

ascane commented 3 years ago

Hi!

I am trying to make Panda grasp a cylindrical object and wonder whether my width and force are set correctly. The object is 16mm in diameter. I have tried various different values, but the object either slid out of the gripper or got squeezed out. Do you know what values I should set? Presumably, once the grasp function is called, the robot keeps grasping while it is moving?

    p = PandaArm()
    g = p.get_gripper()

    p.move_to_neutral()
    g.open()

    p.move_to_cartesian_pose([0.428, -0.02, 0.16])  # hard-coded some values for testing purposes
    g.grasp(0.015, 1)

width=0.015(m), force=1(N) https://youtu.be/NMTkZuU9lw4

width=0.012(m), force=5(N) https://youtu.be/IMmdG0u4l7o

FYI, cylindrical object: mu=0.64, mu2=0.6, mass=0.01, (inertia) ixx=ixy=ixz=iyy=iyz=izz=0.00001

Looking forward to your advice!

justagist commented 3 years ago

Hi, Firstly, the grasp() method is probably not best to be used in simulation; it is mainly meant to be used with the physical robot. The performance in the simulation could be very subjective to the task and setup. There could be many things that could be causing this. My first suggestion is to try using the close() method instead of grasp(), or use small values such as grasp(0.0,0.1). (See https://user-images.githubusercontent.com/22923089/103212090-d6a71080-4901-11eb-9e2a-13c134c4dbe0.mp4 where MoveIt is used for grasping a similar object) If this doesn't help, it is likely to be because of the physics parameters of the object you have defined, for eg. try changing the friction values, mass, size etc. of the object model. It could also be worth noting that simulating the grasping of rounded objects could be unstable (in sim) as well. If you can use flat-faced objects, the physics may be easier.