From: Markus R. <rol...@un...> - 2007-05-01 11:11:53
|
Hi all, Joschka Boedecker wrote: > * It seems evident that we have to optimize the physics somehow. We > should at least get to the point where 3 vs. 3 robots can be reliably > simulated, I think. Without having done any profiling at all, my > suggestion would be to take a look at possibilities to optimize the > collision detection in the ODE part. One possibility is to use separate > collision spaces for each robot. From the ODE Wiki [1]: [...] > Anybody know any volunteers (we might ask on the server-three-d ML)? I've been thinking about the collision issue lately and I think I'll volunteer ;) I think there are only very few changes necessary: - It is already possible to create the additional 'Space' nodes in the .rsg files. So putting each robot into it's own collision space would be a matter of enclosing the current soccerbot.rsg into an additional (node space ) expression or using an external wrapper .rsg that imports the soccerbot. - The problem is registering the ODE geoms to the proper space. This is done in the OnLink() method of the collider class. It calls GetSpaceId() wich in turn calls OdeObject::GetSpace(). Currently the global Space object below the SceneServer is returned. This behavior could be changed to walk the parent chain of the ODEObject in order to find the closest Space parent. If this fails we revert to the current behavior and return the default space. Therefore existing .rsg files will still work as expected. - The actual collision logic needs very little change. The wiki entry [1], that Joschka linked to provides a code snipped that we could nearly copy 1:1 into our code base. I'll try to implement these changes in the simspark CVS. cheers, Markus [1] http://opende.sourceforge.net/wiki/index.php/Manual_(Collision_Detection) |