Clash Detection Solution

Feel free to ask any question here
Post Reply
Raman
Posts: 1
Joined: Thu Mar 03, 2011 5:59 pm

Clash Detection Solution

Post by Raman »

I'm looking to develop a Clash Detection solution, specifically between Point Cloud sets and solid models (facets, solids, surfaces, etc.).
I'm new to this area, but can I use the library for this purpose?
If I cannot, are there some tools (say, creation of the Octtree, etc.) that can help me with the eventual solution? Any suggestions on relevant literature, etc.?

Thanks in advance.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Clash Detection Solution

Post by daniel »

Hello,

CloudCompare (in fact CCLib) is actually used for clash detection in at least one project to my knowledge. It's an ongoing project at EDF R&D. The aim is to detect clashes between static structures (represented by triangular meshes or point clouds) and a moving object (generally represented by a mesh, but in this case we sample points on it so in the end we only consider a point cloud for the moving entity).

Two CCLib sructures are intensively used: the Chamfer distance Transform (ChamferDistanceTransform) and the Octree (DgmOctree).

First, the whole static scene is projected into a 3D grid on which a Chamfer distance is propagated: it's really quick (anyway it's computed only once), and it gives quite accurate distances if the grid step is rather small. With this grid you can determine rapidly the rough distance of any point in space to the nearest object. The sole problem is memory consumption (especially if the scene is wide and you want to keep the grid step small).

With this structure, after having done simple bounding-box clash tests, you can check really quickly if the moving object is actually "near" any static structure. Then, If some points do lie in cells that are very near to static structures (i.e. with Chamfer distance = 0), you can:
- either consider that there is indeed a clash (if the grid step is small enough, i.e. below what you admit to be the precision of your detection algorithm)
- or take those points (only the one that are in cells with Chamfer distance = 0 --> generally there is only a few of them) and compute their distances to the potentially intersecting objects (with DistanceComputationTools::computeHausdorffDistance for point clouds and DistanceComputationTools::computePointCloud2MeshDistance for meshes). It's generally very quick. Computed distances can be once again approximated (with Chamfer Distance Transform, but in a more local way this time) or computed exactly. Octrees on the static objects are also pre-computed. There's some other tricks but I won't enter into details here.

However CloudCompare was not meant to do this particular job, so I'm not sure this is the best tool to do this. The aim was more to build a 'simple' clash detection mechanism with an existing library (CCLib). And it is actually very efficient and sufficient for this project.

Know that I think of it, CCLib is also used in another project I'm involved in to monitor in real time (>50 Hz) the distance of a single moving point to a mesh. The projection of this point on the mesh is also computed in the same time, as well as the surface normal. Once again a dense point cloud is sampled on the mesh (as the DgmOctree structure is only made for point clouds). On a single core, this calculation takes less than a few microseconds, even at a quite large distance (the farer you are from the object, the more time it takes).
Daniel, CloudCompare admin
Post Reply