SarahWeiii / CoACD

[SIGGRAPH2022] Approximate Convex Decomposition for 3D Meshes with Collision-Aware Concavity and Tree Search

Home Page:https://colin97.github.io/CoACD/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CPP Error after processing several examples

SarthakJShetty-path opened this issue · comments

Thank you for open-sourcing this tool. It has been very helpful to run CD on some meshes that I have.

I was trying to decompose some meshes that I have, from an open-source dataset. After processing about ~200-300 meshes in a python for loop, I received this error:

python: /workspace/coacd/src/process.cpp:112: double coacd::MergeConvexHulls(coacd::Model&, std::vector<coacd::Model>&, std::vector<coacd::Model>&, coacd::Params&, double, double): Assertion `p1 < costSize' failed

I've seen this error about 2-3 times at this point. For context, I'm trying to decompose the mesh with these parameters:

coacd.run_coacd(
            mesh=mesh,
            threshold=0.05,
            max_convex_hull=10,
            merge=True,
        )

Please let me know if some of these parameters are incompatible or if this is a known bug for certain meshes.

Thank you!

One additional point:

The constraints that I've placed on threshold and max_convex_hull are not hard constraints, and there is room to change these to more suitable values if that might help mitigate this problem.

Thank you!

Hi can you give me an example for reproducing the error?

Sure! I'm using the code directly from here.

I'm running it on some obj files taken from the popular ABC dataset here.

Here is one example obj file from ABC where I run into this error.

Thank you for your time!

Hi I tried to run the code on your obj, and I couldn't reproduce the error.
When i use t = 0.05 it just output 1 component, and i use t = 0.01 to produce a quite good result as follows:
image

@SarahWeiii apologies for not getting back. I guess the issue was I was running the file with the default parameters, which might have been causing some issue?

I will take another look at this to confirm.

Thank you for your time.