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

Inconsistent collision checking when updating from hpp-fcl 2.2 to 2.3 #1902

Closed
kingjin94 opened this issue Mar 24, 2023 · 6 comments
Closed

Comments

@kingjin94
Copy link

kingjin94 commented Mar 24, 2023

Dear Pinocchio Team,

It seems that somewhere in the collision checking stack changes have occurred that significantly alter collision checking results. As I am not totally into the depths I can only provide the following example at the moment based on the pinocchio wrapper timor-python:

!pip install hpp-fcl==2.2.0 (or 2.3.0)  #Force a specific hpp-fcl version
!pip install timor-python

import timor
assembly = timor.ModuleAssembly.from_serial_modules(timor.ModulesDB.from_name('PROMODULAR'), 
    ["1", "4", "16", "3", "8", "5", "45", "5", "52", "5", "39", "5", "39"])
assembly.robot.has_self_collision()  # Will be true if installed with hpp-fcl 2.3 and false with 2.2

The assembly.robot object is a wrapper for pinocchio's RobotWrapper. The essential properties for pinocchio are (as needed for pin.computeCollisions):

  • assembly.robot.model -> pinocchio.pinocchio_pywrap.Model
  • assembly.robot.data -> assembly.robot.data
  • assembly.robot.collision -> pinocchio.pinocchio_pywrap.GeometryModel
  • assembly.robot.collision_data -> pinocchio.pinocchio_pywrap.GeometryData

The self-collision pairs can be visualized as such: assembly.robot.visualize_self_collisions(); here same color = two parts of the robot in collision. From this robot it seems all new collisions are between meshes and cylinders that lie on neighboring links (if that helps).

Are you aware of any recent changes in pinocchio / hpp-fcl that might result in such different behaviors? Do you have any ideas how to debug this further?

@jcarpent
Copy link
Contributor

Thanks @kingjin94 for raising this issue.
With @lmontaut, we are investing the issue according to the diff: https://github.com/humanoid-path-planner/hpp-fcl/compare/v2.2.0..v2.3.0

@jcarpent
Copy link
Contributor

Looking at your code, it seems that you are considering the meshes as BVHModelOBBRSS model in HPP-FCL, while your meshes are convex shapes. Isn't it?
We are investigating another fix for the BVHModel, with a fix in the afternoon.

But what is sure is that you need to use Convex types by doing:

bvh.buildConvexRepresentation(False)
convex = bvh.convex

@jcarpent
Copy link
Contributor

@lmontaut provided a fix to hpp-fcl humanoid-path-planner/hpp-fcl#387.
Thanks to him and thanks @kingjin94 for providing reprocible example.

@jcarpent
Copy link
Contributor

The issue is solved via https://github.com/humanoid-path-planner/hpp-fcl/releases/tag/v2.3.1.
@kingjin94 You should also consider changing from BVHModelOBBRSS to Convex.

@kingjin94
Copy link
Author

Thanks to you and your team as well. Your response time and dedication is amazing!

@jcarpent
Copy link
Contributor

Thanks @kingjin94 for acknowledging our collective efforts to produce and maintain open-source toolboxes which might help the robotics community to move forward.

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

2 participants