Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cylinder-Cylinder collision wrong when tilted #122

Closed
guihomework opened this issue Apr 8, 2016 · 5 comments
Closed

Cylinder-Cylinder collision wrong when tilted #122

guihomework opened this issue Apr 8, 2016 · 5 comments

Comments

@guihomework
Copy link

Context:
My Lab discovered this bug while using MoveIt! (using FCL) with the Shadow Dexterous hand, which consists of several fingers close together and with cylinders to represent collision shapes

Problem:
when moving the fingers to the side, a little, even with thiner collision cylinders that offer a large gap (more than 5mm) relatively to the fingers size, there are strange collisions as seen here.
collision_with_primitives_small

Test in MoveIt!:
to isolate the problem we created a small moveit example only with two "bars" and the problem can be reproduced. Starting from a certain angle, the collision appears. (0.13rad on both "fingers")
j1_-0 13_j2_0 12_small
j1_-0 13_j2_0 13small

We redid the test by changing the cylinder primitive into a mesh of exactly the same size and same number of faces as the rendered cylinders. The problem does not happen. So it must be in the primitive.

Test in FCL:
FCL has no self test for rotated cylinders, only translated if we understood well, so we decided to add a test in FCL directly that reproduces the two cylinders primitives and adds a rotation at their base (as in the hand), first of 0.12 rad and then of 0.13 rad and the test fails indeed at 0.13.

The test is available here guihomework@b44a3aa

Analysis:
From the code, we think that the conversion of cylinder primitives into a hexagonal prism is the reason for the problem. Due to the small gap in between fingers, the larger hexagonal prisms collide before their rendered counter-part "visually" collide.

Questions:

  • Can you reproduce the problem ?
  • Is there a way to solve that cylinder-cylinder collision ?
  • Otherwise, is there a way to augment the number of faces of the prism when cylinders are converted to meshes ?
  • Or should we go for cylinder meshes directly in the model (which is then slower in other libraries like ODE used by gazebo)

thanks

@sherm1
Copy link
Member

sherm1 commented Apr 10, 2016

I think FCL needs real primitives!

jslee02 added a commit that referenced this issue Aug 13, 2016
@jslee02
Copy link
Member

jslee02 commented Aug 13, 2016

I haven't looked into this problem deeply, but somehow it seems the problem is gone with #154. I tested your test code here.

@guihomework
Copy link
Author

thanks, will have a look if #154 also fixed my issue in the "real" world (understand not the simplified test case)

@jslee02
Copy link
Member

jslee02 commented Aug 15, 2016

Sure! But, it's not sure if the problem is actually fixed. If you still have the same issue, then please provide a test that reproduces the problem. It would be very helpful.

@guihomework
Copy link
Author

@jslee02 I am so sorry to have take a year to answer.
I just checked in our system, and I don't see the issue any longer as seen in these pictures.

moveit_fcl_collision_fixed_cyl-cyl_collision
moveit_fcl_collision_fixed_cyl-cyl_collision2

Collisions are now ok in our hands.

thanks.
I close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants