From: Joschka B. <jbo...@un...> - 2007-02-24 07:14:18
|
Hi Yuan, first of: thanks a lot for doing these tests! Yuan Xu wrote: > Hi Joschka, Oliver and All > > 2007/2/5, Oliver Obst <Oli...@ne...>: >> Hi, >> >> On 04/02/2007, at 3:50 PM, Yuan Xu wrote: >> > >> Well, one direction to approach that would be (1) to start using >> threads anyway: >> 1.a) We decide to care about inconsistencies in sensor readings. >> We could start this by using no buffer, and for the beginning, we >> could use locks so that no 2 threads operate on the scene graph. >> Later on, if the threads are working, we can think about something to >> get rid of the big locks (like the proposed buffer). > > I have done the 1.a) test in an individual program, > I attached the source file. > > In my test program, I try to use three threads which Joschka mentioned: > physics-thread, agent-management-thread and the monitor-agent. > [...] > > I test it in a Pentium D 2.8G , 1G RAM computer, > you can compile the source by >> g++ threads1.cpp -lSDL -lboost_thread-mt -Wall On my machine (Ubuntu 6.10), I used "g++ threads1.cpp -lSDL -lboost_thread-gcc-mt-1_33_1 -Wall" to make it work. > run the a.out > and then do >> gnuplot threads1.plt > to generate the test result in you own computer. > > I think we can guarantee the correct order of events. > see the png I attached. > >> From the plotting, we can see the simulation running smoothly. > > Is everything right? I looks very good, indeed. > > Should we implement the plan 1.a) in simspark, or do more testing ? > It would be great if you could go ahead and work on the implementation of these ideas for the simspark simulator, using the three threads which you mentioned above. To do this, please create a new branch in the CVS. Once everything is finished and tested, we'll incorporate it into the head. Please let us know in case there are any problems or you would like to get some feedback. By the way, just so that I can plan a little, could you please let me know when you think you could have a first version ready for test? I know this is hard to estimate, just try to give me a rough estimate (like Tom Howard mentioned before, estimating is an impossible task, don't worry about having to correct it later). Thanks a lot! Cheers, Joschka |