your patch crashes after some secondes on my machine, cant analyze it. but i remember
an older related topic, where i patched a collision detection for spheres by distance calculation: ODE Collision Control
with ode modules, the best ‘method’ i see is to detect changes in angular velocity.