From: Joschka B. <jbo...@un...> - 2007-05-01 22:14:44
|
Hi Markus, > Hi, > > Markus Rollmann wrote: > >> 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]: >>> >> [...] >> > > [...] > >> 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. >> > > The changes are now part of the simspark CVS trunk. Wow, you are fast! Thanks a lot :-D > I did test the > changes with rsgedit and the jointtest.rsg demo, where I placed each > hinge2thing.rsg, sliderthing.rsg and universalthing.rsg in a separate > space each- and it worked fine ;) > > Nice :-) > The problem was not in the setup of the different collision spaces but > in the deconstruction of them. > > The problem is that all ODE objects should be deconstructed in the > proper order. [...] > > I'm not sure if it's necessary to copy this whole machinery to the > rcsssrver3d CVS, maybe some special handling for agent disconnect will > suffice? > Yes, maybe you're right and we can handle this in an easy way somehow for the agent disconnects. I'll take a look after I'm back from JapanOpen, but if anybody else wants to have a look in the meantime -- feel free ;-) Cheers, Joschka |