frankaemika / franka_ros

ROS integration for Franka research robots
https://frankaemika.github.io
Apache License 2.0
339 stars 307 forks source link

panda description hand/gripper collision #219

Closed YannickRiou closed 2 years ago

YannickRiou commented 2 years ago

While working on a real panda with Moveit and Moveit Task Constructor, I found that the collision model of the panda hand defined in this package is weird and not really accurate when trying to pick objects.

Here is what I got when Moveit was telling me about a collision between objects and panda hand model : panda_collision_wtf As defined in the franka_ros/franka_description/robots/hand.xacro , the hand is defined as sphere, cylinders, etc for collision checking.

I tried to modify this model while using the mesh files already available in this package (as it is done with other robot definition, for example, the PR2 gripper collision model uses meshes) and I got this which is more accurate. panda_collision_ok

My main question is why sphere and cylinder were used in the first place for collision definition of the gripper ? It is because it is faster to check collision with simple shapes instead of a mesh ? And also why the simple shapes seems to not be the correct size ?

Thanks for theses precisions

gollth commented 2 years ago

Hi @YannickRiou,

My main question is why sphere and cylinder were used in the first place for collision definition of the gripper ? It is because it is faster to check collision with simple shapes instead of a mesh ?

Short answer: Yes. This is not only done for the gripper but the entire arm. The reason why this is in the URDF is because the internal controller will use these primities for self-collision avoidance.

And also why the simple shapes seems to not be the correct size ?

With "correct" I assume you mean not matching the actual robot's geometry. This is also related to the fact that these primitives are used for self collision avoidance. To be able to avoid self collisions in a dynamic situation there must be a safety margin (called safety_distance in all URDF files) around the shells to account for deceleration.

We are quite aware that these capsules make the whole motion planning weird, but this will be solved with the MoveIT upgrade: https://github.com/frankaemika/franka_ros/pull/199

I would close this issue here, since its tracked in that PR, but feel free to join the discussion of there.

If this doesn't answer all your questions, also feel free to reopen this ticket.

Best