avalenzu/drake — pull request #15 by avalenzu (2014-04-07 15:34:26+00:00)
Title: Cylinders are cylinders

Now that we have capsule support, I'm making cylinders actually be cylinders. Collision detection for cylinders is OK, but not as accurate as for the other shapes we use. This has to do with the way Bullet treats cylinders in their closest distance/penetration depth code.

Unlike spheres, capsules, and convex hulls of meshes, which are represented by a fixed set of vertices, Bullet's cylinders compute local "vertices" on the fly. As a result, the closest distance/penetration algorithms take a lot longer to converge for contact-pairs including cylinders and require more memory in the penetration depth case. Also, the closest-distance algorithm has too much variation in its results for cylinders for those results to yield numerical gradients that match the user gradients. This remains true even after I've tightened all of the tolerances I could find in the Bullet source.

So, perhaps there should be a warning when you compile a RBM with cylinder collision elements? What do you think, @RussTedrake?