I noticed, that under some cirumstances a collision between a cylinder (same for capsule or ray) and a
trimesh is not detected properly.
The bug is only visible for certain combinations of cylinder radius and position.
Attached you find a python script (using pyODE) that visualizes collisions ("X") and misses (".").
It creates a square (made of two triangles) as a trimesh. The other object is a cylinder.
The cylinder is positioned within a given range of x and y and all collisions ("X") and misses (".") are marked.
The expected result is a square of collisions.
For most combinations of cylinder radius und position this works.
But certain combinations show broken corners (no collisions detected) of the triangles.
Attached you also find the output of the script.
In case you are not used to run pyODE scripts, just follow these steps:
1) "apt-get install python-pyode" (on debian/ubuntu systems)
2) "python ode_trimesh_collision_simple.py"
I use pyODE (v1.2.0) and ODE (v0.11.1) on Debian Squeeze (i386).
I integrated ODE into a CNC toolpath generator (PyCAM) and it is really a pain to imagine the drill crushing with full force into the material due to a non-detected collision :(
(in fact: currently every toolpath that was generated with ODE contains errors at the corners of the model)
I hope, these are enough information to find the root cause of this bug!
thanks for your time,
Lars
sample python script visualizing collisions in a x/y range
output of sample script (a square of collisions ("X") is expected)
I created a C-version (using drawstuff) of the problem. See attached file.
It doesn't seem to be possible to add files to bug theat are create by someone else, so I created a new report to attach the C-file to:
https://sourceforge.net/tracker/?func=detail&aid=2974208&group_id=24884&atid=382799
I wonder if this is the same issue I described in bug #2214773. Does this still occur if the trimesh is rotated at least 0.1 angle on all three axis?
See: http://sourceforge.net/tracker/?func=detail&aid=2214773&group_id=24884&atid=382799
I tried to rotate the cube (see the example python script) by some degrees in all three directions, but there are still small glitches at some of the corners. Thus this does not seem to be the root cause for the mis-detection.
@martijnbujis: thanks for your comment, anyway!
Attached demo_lars_kruse.c mentioned in post from 2010-03-21