From: Patrick G. <Pat...@on...> - 2011-12-20 03:50:13
|
Hi, Im continuing on the SimSpark Gui Project but i think i *might* have hit a roadblock. I hope it is nothing or at least solvable without changing zeitgeist too much, so heres the problem: The Gui is currently designed to start and watch different threads that might either be internal or external monitors, agents and (one) server. The concept is meant to define new Simulation Setups containing those threads, some scripts modifying the execution of the threads (e.g. loading NaoSoccer etc.) and loading different GuiPlugins for each Simulation without having to write new compilable projects or edit script files. So i wrote a more general class SimSpark derived from Spark (just als those in rcssserver3d etc), where i add resource locations and scripts at runtime. So far, executing the server as separate thread in the gui works without a problem. But now i need to start, stop and/or restart multiple instances of SimSpark at once or after another, for example restarting the Core or initializing two SimSpark objects at the same time for a distict server and a monitor. But zeitgeist crashes when it is initialized again after being closed, because there are some static properties and leftover references to the previous Core. While rsgedit avoids this problem by never actually removing its single Spark instance (but resetting it), this wont work in my case since i need more than one instance at the same time. I can seek and replace static references and objects in zeitgeist, oxygen and kerosin, but i dont know if the script interface is able to deal with multiple simulation/script servers anyway. In the ruby wrappers there dont seem to be any distict Ruby-Contexts but only one single interface. If so, is it possible to wrap the ruby calls without changing the whole core? Or will the interface work with different Script-Servers accessing it? I just need to know this before i attempt to rewrite parts of zeitgeist and oxygen. Of course there is the possibility of integrated monitors and agents in the server itself. But i definitely want to support external processes and (gui-)internal threads first. When not relying on the direct control of the core but using the tcp/ip commands first i can cover two kinds of execution (as thread in the gui, as process observed by the gui) at the same time. I dont know if i have time to implement both server-internal and external monitors and agents right away, so i want to stick with the more important kind. This way, both observing and controlling externally started processes (rcssagent3d.exe etc..), and integrating them into the gui to display and debug them in one window would be possible. Please tell me if you have some advice on how to deal with the situation. Also, you might want to have a look at http://simspark.sourceforge.net/wiki/index.php/Graphical_User_Interface . If you have concerns ideas and/or wishes, you can always comment or edit on the project page describing the main features of the gui. It is meant to be used someday after all, so feedback from those who might want to use (and extend!) it is always appreciated xD Best regards, Patrick Geib |