Comments (4)
Yes, that's likely a bug, but:
- I believe B[0] isn't right, although barely used because it represents the case when the latest vertex
a
is discarded - and that's never the case for GJK, but may be useful to develop for EPA. - I doubt you actually need to
ADAPTIVEFP
.
I'm not sure if I understand your question, what do you mean by "clamp that to [0,1] as the lambda"? Anyway, unless you can guarantee that all your simplices are not "degenerate", then you need the reduction stuff. The SV method is recursive, but specifically for a 1-simplex (line segment) the call to S1D leads to either of these cases: (i) The origin is between A and B or (ii) The origin is beyond A. Again, the origin cannot be found beyond B in GJK, but may be useful to develop for EPA.
from opengjk.
Thanks for the reply - I don't need the ADAPTIVEFP, but I was looking at that branch because it was easier to understand than the for -loop in the non-adaptive case!
As for the S1D stuff, consider the test of point b.
if x is dotProduct(b, t) / dotProduct(t, t)
then det_pb = (x * (ai - bi) + bi) - bi = x * (ai - bi)
so the sign test with ti (= bi-ai) is comparing the signs of x * (ai - bi) and -(ai - bi)
In other words, ai and bi make no difference, degenerate or not, to the sign check and you can just test for x < 0. And in the case of the origin being between A and B, x actually is the first lambda value.
Not sure if I've explained this properly or if I'm missing something?
Adrian
from opengjk.
You are right, there are a few unnecessary operations there: -bi
, -1*
. I believe the method would be equivalent but better coded - and better coding help presenting the method as well.
We have been working on a new, totally undocumented, method and for S1D things may work out like you said: first a dot product identifies the support of the point of minimum norm, then a second step computes the shortest vector.
from opengjk.
I won't do any work to fix the potential bug reported here, but I'll close this once I merge the dev branch into master as the new algorithm doesn't show this.
from opengjk.
Related Issues (20)
- Possible linker issue on Ubuntu 18.04 - Undefined Reference HOT 4
- [Feature Request] Returning Additional Information HOT 6
- False negative for penetrating boxes HOT 5
- contact information HOT 2
- Meaning of Minimal Distance for Collision HOT 1
- Adding Support for Spheres and Cylinders HOT 3
- Attempted to write a file into source HOT 1
- UNEXPECTED VALUES !!! warning message HOT 5
- Error in build: Invalid numeric armument '/Wunused-macros' HOT 3
- what algorithm is used by function hff? HOT 1
- User suggestion to speedup S2D
- enhancement HOT 5
- Cannot make it work for Matlab under Ubunto20 HOT 1
- Error Using mex - Matlab under Linux HOT 3
- Go implementation HOT 3
- Two rather simple non-colliding objects, but pygjk() returns "nan" HOT 4
- How to judge if two bodies penetrate each other or not ? HOT 2
- Publish the benchmarking code HOT 1
- How to resolve the issue of UNEXPECTED VALUES!!! HOT 2
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 opengjk.