I’ve been tinkering with Box2D.
The original version uses Baumgarte stabilization of position errors. The problem with Baumgarte is that it affects the momentum, leading to bouncy or spongy constraints. I’ve attempted to address that problem with Split Impulses and Post Projection
Split Impulses works by making a separate set of pseudo velocities and impulses that serve to reduce position error and don’t influence the velocity solver. This is a fairly cheap solution because it is mixed in with the velocity solver. It works great for contact constraints. However, it does not work so well for joints. I don’t know why it doesn’t work well for joints, but on the other hand, I don’t know why it works so well for contact.
Post Projection is a more mathematically correct method of dealing with position errors. Post Projection (PP) waits until the velocity solver is done and the positions are integrated. PP then attempts to solve the position errors. PP introduces an outer iteration loop which recomputes the Jacobians and updates the positions. PP is the most expensive solution so far, but it is also the most effective.
See this post on Erwin’s site for more info: Bullet Forum Discussion
I also added correct handling of joint softness. This allow me to simulate a suspension bridge with soft joints and gets rid of the relaxation hack.
Box2D Super Split