2.17 problem

Jack
Posts: 59
Joined: Thu Aug 31, 2006 11:51 am

2.17 problem

Post by Jack »

It looks like for static objects "setWorldTransform" always carry Identity matrix in "worldTrans".
Now I can not move my static object. :cry: In prev. version all was OK......
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: 2.17 problem

Post by Erwin Coumans »

Jack wrote:It looks like for static objects "setWorldTransform" always carry Identity matrix in "worldTrans".
Now I can not move my static object. :cry: In prev. version all was OK......
You should use 'kinematic' for moving static objects. See the CcdPhysicsDemo for an example, search for 'kinematic in that demo. Are you using btMotionState?

Things have changed/improved, but perhaps there is an issue. Don't worry, if you can show me (by private message) what is wrong, we'll fix it.

Erwin
User avatar
SteveBaker
Posts: 127
Joined: Sun Aug 13, 2006 4:41 pm
Location: Cedar Hill, Texas

Post by SteveBaker »

I just did a checkout from SVN - and the 'trunk' version is missing a file LinearMath/btQuickProf.h:
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

SteveBaker wrote:I just did a checkout from SVN - and the 'trunk' version is missing a file LinearMath/btQuickProf.h:
No files missing: it was a typo in DemoApplication.h, QuickProf.h -> Quickprof.h

I'm surprised that my Mac OS X build just worked fine?!
It has been fixed in SVN. I'm on travel, and the hotel connection doesn't let me upload a new version of bullet-2.17.tgz, so it will be done early next week,

Thanks for reporting!
Erwin
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

The recent Bullet development on synchronizing the motion state has some issues which will be fixed in the next release: for kinematic/static objects, the 'setWorldTransform' should not be called, only dynamic rigid bodies need this callback.

As a temporary workaround for static/kinematic objects, please call 'setCenterOfMassTransform' on the btRigidBody object, instead of setting m_worldTransform member directly.

Thanks,
Erwin
User avatar
SteveBaker
Posts: 127
Joined: Sun Aug 13, 2006 4:41 pm
Location: Cedar Hill, Texas

Post by SteveBaker »

Erwin Coumans wrote:
SteveBaker wrote:I just did a checkout from SVN - and the 'trunk' version is missing a file LinearMath/btQuickProf.h:
No files missing: it was a typo in DemoApplication.h, QuickProf.h -> Quickprof.h

I'm surprised that my Mac OS X build just worked fine?!
It has been fixed in SVN. I'm on travel, and the hotel connection doesn't let me upload a new version of bullet-2.17.tgz, so it will be done early next week,
OK - I can fix it now that I have SVN commit privs.

I think some OS's do not check for case-sensitivity in filenames...this might explain why it works in MacOS but not Linux.
User avatar
Dragonlord
Posts: 198
Joined: Mon Sep 04, 2006 5:31 pm
Location: Switzerland

Post by Dragonlord »

Should Mac not be case sensitive too? At last Linux is case sensitive and wrong case gonna kill you.
Jack
Posts: 59
Joined: Thu Aug 31, 2006 11:51 am

Post by Jack »

I also found that if two static objects overlap each other then ASSERT(m_Adiag > 0.0f); in btJacobianEntry::btJacobianEntry occurs....
Very annoying in DEBUG builds. However RELEASE builds work OK.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Jack wrote:I also found that if two static objects overlap each other then ASSERT(m_Adiag > 0.0f); in btJacobianEntry::btJacobianEntry occurs....
Very annoying in DEBUG builds. However RELEASE builds work OK.
This assert should never trigger, there is no purpose in trying to solve velocities between static/kinematic objects. By default there should be no collision detection and/or constraint solving between static and kinematic (animated) objects. Are you applying proper collision filtering flags? Can you send me some snippet (using PrivateMessage) so I can reproduce this in a Bullet demo?

Thanks in advance,
Erwin
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Issues with static objects have been fixed in Bullet 2.18a.

Make sure you use btMotionState, to synchronize world transform between physics/graphics (see latest Bullet Demos). Also use the btDiscreteDynamicsWorld::addRigidBody, to add rigid bodies to the world. This automatically updates the collision filter flags, to avoid static-static collision detection.

Thanks for reporting!
Erwin
Jack
Posts: 59
Joined: Thu Aug 31, 2006 11:51 am

Post by Jack »

btDiscreteDynamicsWorld::addRigidBody sets gravity. Strange situation occurs. I set object gravity to zero (in constructor), then call addRigidBody. addRigidBody overwrites my gravity...

If I remove object, then add it back, addRigidBody overwrites gravity. Odd behaviour.... :roll:
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Jack wrote:btDiscreteDynamicsWorld::addRigidBody sets gravity. Strange situation occurs. I set object gravity to zero (in constructor), then call addRigidBody. addRigidBody overwrites my gravity...

If I remove object, then add it back, addRigidBody overwrites gravity. Odd behaviour.... :roll:
This is intended and expected behavior, and will be clearly documented in the upcoming Bullet documentation.

Whenever you call 'setGravity' on the btDynamicsWorld, all rigidbodies that are currently added to this world will get this new gravity. And if you add a new rigid body to the world, it gets the gravity that is acting in that world. The only way you can have per-object gravity is to set its gravity AFTER you added it to the world. Also don't call 'setGravity' on the world, because it will overwrite all current gravity.

Thanks for the feedback,
Erwin