Comments (1)
Just to add - since this is accessing bad data, you can run coacd on the same mesh many times and get different results as far as # of shapes, points, etc.
For now, i've replaced the following...
https://github.com/SarahWeiii/CoACD/blob/main/src/process.cpp#L162-L186
with
if (p1 < costSize)
{
rowIdx = (addrI * p1) >> 1;
size_t top_row = erase_idx;
for (size_t i = 0; i < p1; ++i)
{
//I ADDED THIS CHECK BECAUSE OUT OF BOUNDS STUFF WAS HAPPENING UNTIL I CAN FIGURE OUT WHAT IS GOING ON HERE
if (rowIdx < costMatrix.size() && rowIdx < precostMatrix.size() &&
top_row < costMatrix.size() && top_row < precostMatrix.size())
{
if (i != p2)
{
costMatrix[rowIdx] = costMatrix[top_row];
precostMatrix[rowIdx] = precostMatrix[top_row];
}
}
++rowIdx;
++top_row;
}
++top_row;
rowIdx += p1;
for (size_t i = p1 + 1; i < (costSize + 1); ++i)
{
//I ADDED THIS CHECK BECAUSE OUT OF BOUNDS STUFF WAS HAPPENING UNTIL I CAN FIGURE OUT WHAT IS GOING ON HERE
if (rowIdx < costMatrix.size() && rowIdx < precostMatrix.size() &&
top_row < costMatrix.size() && top_row < precostMatrix.size())
{
costMatrix[rowIdx] = costMatrix[top_row];
precostMatrix[rowIdx] = precostMatrix[top_row];
}
top_row++;
rowIdx += i;
assert(rowIdx >= 0);
}
}
Really hoping someone smarter than me can figure out what the proper fix is here though.
I don't know what this is even supposed to be doing or what a cost matrix is so it's hard to fix.
from coacd.
Related Issues (20)
- Specifying max # hulls and max # vertices per hull HOT 4
- Compile error:tbb is missing HOT 2
- error: variable or field βdebugβ declared void 13 | inline void debug(spdlog::string_view_t fmt, const Args &...args) HOT 10
- The number of faces is 4x larger compared to vhacd in a test model HOT 2
- AllocatorFooChar missing error when building from source HOT 1
- How to compiling for windows HOT 6
- relationship between concavity threshold and actual distance HOT 2
- Strange decomposition on simple case. HOT 15
- CPP Error after processing several examples HOT 5
- Usage on Apple Silicon HOT 1
- Is possible to see only the preprocessed mesh? HOT 5
- When building CoAcd can't link to the standard math library on Macos HOT 5
- Crash when decomposing HOT 6
- Problem encounted in generating collision shape HOT 2
- Reduce number of vertices in each convex hull HOT 5
- Splitting into multiple files for Mujoco HOT 1
- Remove syntax in the output file HOT 2
- For certain parameters of example objs, there may be assert failed in the C++ Windows compiled version. HOT 2
- Troubles compiling for windows HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coacd.