rickstaa / panda-gazebo

A reinforcement learning-oriented Panda Emika Franka gazebo simulation.
https://rickstaa.dev/panda-gazebo/
MIT License
14 stars 2 forks source link

The franka_gazebo `gripperAction` action Service implementation should be improved #33

Open rickstaa opened 2 years ago

rickstaa commented 2 years ago

The simulated gripper is implemented suboptimal in franka_ros (see https://github.com/frankaemika/franka_ros/issues/172):

  1. Gripper PID gains need improvement for the /franka_gripper/gripper_action/goal action to set the gripper width accurately when the gripper is vertical (see this and this comment).
  2. Additionally, there is a need to enhance the functionality of the /franka_gripper/gripper_action/goal action. The gripperAction currently has a limitation—it can only grasp objects when the gripper width is explicitly specified. On the other hand, the grasp action can grasp things but cannot set a desired gripper width. In reinforcement learning, it would be advantageous for the robot to autonomously learn and set the gripper width while grasping objects, even without prior knowledge of the object size.

EDIT: I worked around issue two by setting the /franka_gripper/gripper_action/width_tolerance parameter to a value more significant than the max gripper width (see https://frankaemika.github.io/docs/franka_ros.html#frankagrippersim).

TODOs

rickstaa commented 2 years ago

Fixed when https://github.com/frankaemika/franka_ros/issues/172 is fixed.

hamsadatta commented 1 year ago

Hi @rickstaa , I am trying to manually grasp the object using moveit. But I see the below behavior (check the animation). The gripper's finger moves back once it detects an object. How to disable that feedback behavior. I also tried to set the "brute_force_grasping" argument to true but did it not bring any change. My "control_type" is set to "trajectory".

https://github.com/rickstaa/panda-gazebo/assets/48976724/03055ab3-9cbc-42cb-9df6-6f759497e06b

rickstaa commented 1 year ago

Hi @rickstaa , I am trying to manually grasp the object using moveit. But I see the below behavior (check the animation). The gripper's finger moves back once it detects an object. How to disable that feedback behavior. I also tried to set the "brute_force_grasping" argument to true but did it not bring any change. My "control_type" is set to "trajectory".

panda_grasp.mp4

@hamsadatta thanks for your bug report. I also need to fix this for my own research so I will take a look this week 👍🏻. I got it to work earlier.

rickstaa commented 10 months ago

@hamsadatta, I've dedicated some time to delve into this issue (see https://github.com/frankaemika/franka_ros/issues/172#issuecomment-1819302834). It appears that Franka has made specific enhancements to the simulated gripper actions. While the /franka_gripper/grasp/goal can now effectively grasp objects, it falls short when setting a specific gripper width. Conversely, the /franka_gripper/gripper_action/goal can manipulate the gripper's position but cannot grasp objects. I'll explore potential workarounds briefly, but a resolution from @frankaemika upstream must address this issue comprehensively.

rickstaa commented 9 months ago

@hamsadatta I just merged https://github.com/rickstaa/panda-gazebo/pull/199, which makes brute_force_grasping the default and depricates the launchfile argument. Grasping should now work in the simulation.