fcl
fcl copied to clipboard
Raycasting?
Is there any recommended way to go about checking for collision along a line? I'm implementing FCL as an alternative to bullet and need to provide the same functionality. I'm considering using a very long and thin cylinder, but wanted to check before using a hacky solution.
We need FCL raycasting at TRI also!
It looks like there is a feature flag for this, but it doesn't look like it does anything? https://github.com/j-rivero/fcl0.5/blob/master/src/continuous_collision.cpp#L279.
Perhaps someone here knows of a test case we could look at for implementing ray casting on top of FCL's BVH datastructures?
I'm considering using a very long and thin cylinder, but wanted to check before using a hacky solution.
Better use a capsule than a cylinder. It's faster and behaves better numerically.
I see, thank you for the quick reply!
Would the preferred way be to set a very long capsule and then sort the resulting collision points along the ray, or to ray march the length of the capsule?
I suppose that you could also use continuous collision detection to shoot a sphere along a ray, but I guess this is probably slower?
If you only need the first collision, then a sphere of a very tiny radius and ccd is probably fine. I never used ccd from FCL (it does not support relative motions coming from robot kinematics) so I can't say about performances with the FCL implementation. However, I guess it is going to be a lot slower because you will have several BVH traversal.
The fastest is definitely to implement a special raycasting traversal. I don't think it is hard but, with FCL design, it's going to be verbose and spread into several classes.
Still no solution?
+1 Need raycasting