|
From: Markus R. <rol...@un...> - 2008-04-12 07:38:43
|
Hi, Feng Xue wrote: > Yes, the nao model has been modeled like that(some bodyparts are in > some bodyparts totally). And if I use universal joint instead, it > is probably okay. But the universal joint is not equal to two hinge > joints and is hard to control for the joint limits according to current > work. Besides, refering to Webots' implemention, they use hinge joint on > all the joints too. I still don't see why it is necessary that two geoms are constantly colliding by design in the nao robot model. But if that's a requirement, so be it. > The test is expensive because of the GetSpace() call. Maybe we can > solve it by a simple cached variable of parent space :-D The first thing you come up with is not always the best solution. Please stop modifying core parts of the physics implementation without some discussion _before_ committing_ something! Please describe your change on the mailing list first or use an experimental branch [1] in the CVS. In your current work style it is quite hard to follow your changes and work on a solution. Concerning your latest change to the Collider class: I think carrying a 'space' pointer in each Collider may work but is a quite heavy weight solution. You further don't adapt the pointer if the geom is moved to another space. I think it would be nice to query special properties of Spaces without following three pointers (from dGEomId to Collider to Space)... The ODE library already provides a function to get the spaceId given a geomId (dGeomGetSpace(dGeomId)). So given dGeomId obj1 and obj2 in Space ::HandleCollide it is easy to get and compare both spaceid. >From this point on we could either use the cached space pointer that you added or manage a simple static set of dSpaceIds in the Space class. This set contains spaceIds of spaces that have the 'mIsDisableInnerCollision' set. Querying this set is a fast lookup without any pointers involved. Opinions? (prior to any commits please ;) cheers, Markus [1] http://ximbiot.com/cvs/wiki/CVS--Concurrent%20Versions%20System%20v1.12.12.1%3A%20Branching%20and%20merging |