Body with torque: sleeps too soon

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Body with torque: sleeps too soon

Postby ranun » Tue Jan 10, 2012 7:58 pm

Hello,

I have a body that has no force applied to it accept torque. The body is set to auto-sleep. When no other force is applied other than torque (NewtonBodySetTorque is called, but never NewtonBodySetForce), the body sleeps and stops moving while the torque is clearly "active." Disabling auto-sleep ensures that the body continues to move as expected. I have not yet determined the torque threshold for the auto-sleep -- I can do that if it's useful.

Should the body auto-sleep while the torque is visibly active (see video below)? If not, is this a configuration problem on my side or a Newton problem further down?

Related: It looks as if something like this was a solved bug back in October 2010. http://newtondynamics.com/forum/viewtopic.php?t=6184

Setup: Newton version 2.33, downloaded build, both release and debug versions. Default solver model. Composite collision around the body. Let me know what other details would be useful.

Video demo of the problem: http://www.youtube.com/watch?v=_8p_-rYm1s4

Thanks.
ranun
 
Posts: 2
Joined: Mon Jan 09, 2012 11:16 pm

Re: Body with torque: sleeps too soon

Postby Julio Jerez » Wed Jan 11, 2012 8:02 am

but this is why there is a active deactive option. wpuld setting auto sleep off and let it is run do what you want?

the problem with not having a cutoff limit for integration the linear and angular momnetum of a body is that,
the law of conservations of momentum say that momentum is conserved. what this means is that the body will move for ever, even with a coefficeint of drag acting on it.
a coefficent of drag attenuates the memotum but the problem is that the ammunt of attenuation is proportinal of the amount of momenton, so the lower the momentum the lower
the attenuation and that takes an infinite amount of time to reach zero zero mementum.

what newton does is that when the momentum reach some low value, it swiches to a linear attetuantion model, the attenunation proportiomant to time. that reaches zero very fast.
hoewver that option is tuned off when the body do not have the auto sleep option. so you get both posibilities.

Remember the engine is for real time simulation, so those things are neesessary to curve the edges on the law of newtonian physis, otherwise the engine will be unpratical for a large scale simulation.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Body with torque: sleeps too soon

Postby ranun » Wed Jan 11, 2012 12:31 pm

Thanks for the explanation, Julio. I wanted to make sure that Newton was working as expected since it looked like there was a similar-looking bug in the past. If you're happy, I'm happy.

In my case, the visual aspect (the sudden stop) is what matters, and I agree with you: disabling auto-sleep will address this. So no worries.

Thanks again.
ranun
 
Posts: 2
Joined: Mon Jan 09, 2012 11:16 pm

Re: Body with torque: sleeps too soon

Postby Julio Jerez » Wed Jan 11, 2012 1:04 pm

ranun wrote:In my case, the visual aspect (the sudden stop) is what matters, and I agree with you: disabling auto-sleep will address this. So no worries.


this is the part wher teh end use play an imprtan role on use the tehnology.
Basically whe you codul do i sthat you can and logic to controll teh situation.

for example you cna monitor the momnetum and the angula mo,netum of a body, and diasbble the auto sleep on teh bodies that you want to controll.
the by tracking that in a callback you mau deside when to tun back on.

with the newton engene you can actually do that kind of controll because the auto sleep functionality in Netwon is not a "law of physics" like it is on other engines.
on all oteh engines with out auto sleep object will go to an undesarible jitter state.
With newton proper configured bodys (no extreme mass or aspect ratios on the inertial matrix) a will move normally when aut sleep set off, it just that it will take a very long time to stops if it ever stops.
In fact if you set default drag to zero, the body will continue moving for ever (not withtanding the Caus that happens dereasin a loat values continuelly and generation denrmalize values).
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 5 guests

cron