Sign in to follow this  
Optimus Prime

Simulation Time problem

Recommended Posts

Hello Everyone, At the moment, I'm developing a ragdoll physics simulation using OpenGL and ODE. I'm evolving a neural network that teaches the ragdoll how to perform various tasks (walking, standing, etc). The problem is that each iteration of the learning function is performed real-time with graphics rendered to the screen. This is great if I want to view what's happening at a speed I can comprehend. However, there are times when I would rather my CPU just crunch numbers and not worry about real-time rendering. Obviously, I can disable all graphics functions, and mess with the global timer so that time "seems" to be moving faster. However, when I do this, the physics engine (ODE) becomes incredibly unstable and inaccurate. Now, I'm not too keen on physics, nor the physics engine I'm using. I know just enough to simulate my world. Is there some way to speed my simulation without the physics going haywire? To put this problem into perspective, I'll say this. When I run this simulation on my 800 MHz P3, everything runs fine and well at about 50fps. When I run this on my new Athlon FX 2800 MHz computer with 2 gigs of ram, I get about 150fps. However, both simulations look exactly the same, with exactly the same physics. The thing is, I'm not worried about fps at the moment. These fitness functions take sometimes hundreds of thousands of iterations to produce something useful. If I run these sims in real-time, it's going to take forever. Is there a way in ODE to turn off real-time so that it just crunches numbers? [Edited by - Optimus Prime on November 9, 2006 6:57:19 PM]

Share this post


Link to post
Share on other sites
You don't have to run ODE in a timer loop. Just put it in a standard "for" loop and run as fast as it will run. You can even run in a command line app that has no visual. Or concept of graphics.

The bigger issue is whether ODE will be stable as you increase your time step. That will be your speed limit once you are running in a pure language loop. Depending on the constraints and loading conditions, ODE will be more or less stable. Are you using rigid body constraints (e.g., with constraint Jacobians) or penalty methods at your rag doll joints? No matter, both cases are going to limit your time step. Are you certain you have your inertia tensors in consistent units? Unit inconsistency can be a major source of stability problems.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this