From: Yuan X. <xuy...@gm...> - 2007-05-21 15:34:15
|
Hi Markus, Thanks for your reminder. After some changes, the server runs faster! The server can keep running when 10 agents connected, but with incorrect timing. I will do more test then, and try to have a look at stack problem. > > I think we already have a full copy of the scene state that is relevant > to physics: The ODE library itself holds all relevant state ;-) > > Therefore it should be possible to run the physics thread in parallel. > Possible conflicts only arise when the new ODE state is written back to > the scene graph. At this point we have to wait for other threads to > become ready. > > The point from which the physics thread could run in parallel lies > within the SceneServer::Update() method _after_ the call to > PrePhysicsUpdate(). From this point on the collision handling and > stepping of the world relies entirely on the internal ODE state. > Therefore both steps could be run in parallel to e.g. the OpenGL thread. > > The collision handling runs mostly within ODE code. Excpetions are the > collision callbacks that may modify the scene in turn. The most common > Collisionhandler nodes are the ContactJointHandler. This nodes calls the > dJointAttach ODE function and should therefore be no problem. > > Other collision handler nodes are derived from the recorder handler that > collects collision events for further processing within the node itself. > The collected information is ususally only referenced after the physics > update, e.g. from the SoccerRuleAspect or some sensor implementation. > > If other threads don't modify the ODE state while the physics thread > runs, there should be no problem. However as ODE is quite stack hungry, > we might have to increase the stack size manually in the pyhsics thread > [1,2]. > > Cheers, > Markus > > [1] http://thread.gmane.org/gmane.comp.lib.ode/12094/focus=12095 > [2] > http://news.gmane.org/find-root.php?message_id=%3c7dfa3e5505081812185ce79b97%40mail.gmail.com%3e > -- Best wishes! Xu Yuan School of Automation Southeast University, Nanjing, China mail: xuy...@gm... xy...@ya... web: http://xuyuan.cn.googlepages.com -------------------------------------------------- |