I am a beginner of Bullet Physics, but I have a question about its performance.
I am simulating quadruped robot in Bullet Physics world.
I set some parameters(constant) to let the robot move, and record the distance(>0) which the robot move in 3 seconds.
But the result(motion) is not same at each times. I think all parameters I set are constant, so the robot will conduct the same behavior and we will get the same result.
I have no idea about the problem.
Please tell me why the result is different.
(Sorry I am a Japanese student... poor English...)
http://www.youtube.com/watch?v=0cIuZh3E2v8
I can't get the same result.
-
- Posts: 149
- Joined: Fri Jun 24, 2011 8:53 am
Re: I can't get the same result.
I've only had minor experience with complex constraints but I've never observed anything so extreme.
How is your world stepping?
Try running everything at constant step.
In my experience, Bullet has very good repeatibility.
How is your world stepping?
Try running everything at constant step.
In my experience, Bullet has very good repeatibility.
-
- Posts: 4
- Joined: Tue Jan 03, 2012 11:57 am
Re: I can't get the same result.
stepSimulation Time is set to be 1/100.
However, it doesn't return the same motion.
I have no idea.
Though I can get really same results with toy problems, I can't get the same results with complicate simulation...
However, it doesn't return the same motion.
I have no idea.
Though I can get really same results with toy problems, I can't get the same results with complicate simulation...
-
- Posts: 19
- Joined: Thu Jun 28, 2012 5:06 pm
Re: I can't get the same result.
Try destroying the physics world and re-creating it every epoch. This shouldn't be necessary, but perhaps it will let you run the simulation reliably.
-
- Posts: 83
- Joined: Tue Oct 24, 2006 11:52 pm
- Location: Australia
Re: I can't get the same result.
In SuperTuxKart we actually reset the variable m_localTime of btDiscreteDynamicsWorld to 0 if we replay a race. Otherwise this variable will have some 'left over' time:yamadagenki wrote:Though I can get really same results with toy problems, I can't get the same results with complicate simulation...
Code: Select all
m_localTime += timeStep;
if (m_localTime >= fixedTimeStep)
{
numSimulationSubSteps = int( m_localTime / fixedTimeStep);
m_localTime -= numSimulationSubSteps * fixedTimeStep;
}
Hope that helps!
Joerg