From: Alexandre H. V. S. <ahv...@gm...> - 2007-01-30 13:43:36
|
I changed my ' robot.runThreaded (-1, -1); ' to ' robot.runThreaded (100, -1); ', as jugested John and I printed every sonnar read and position chang= e (with 'System.out.println()' ). Gazebo still run 'jumping'... :-( The application is not reading and seeting position too much, its normal. Java is consumming about 30% - 60% of CPU, wxGazebo about 4% and gazebo about 7%. I make other videos showing CPU usage with only Gazebo and with Java applicatio. Both can be found at http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/OnlyGazebo.ogg and a= t http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/GazeboWithJavaApp.og= grepectively. The other videos also show CPU usage: - http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Gazebo.ogg =3D> w= all follower in Gazebo - http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Stage.ogg =3D> wa= ll follower in Stage Thanks. 2007/1/30, Radu Bogdan Rusu <ru...@cs...>: > > John Oliver wrote: > > My initial thought would be that looking at the code if you pass -1 to = a > > runThreaded then the PlayerClient will only yield in between each read(= ) > > function to the simulator. This will then allow other threads to > execute, > > if there are none requiring execution then it will come back almost > > immediately and issue another read(), this could then mean that you are > > spamming the simulator with thousands of read requests a second, on top > of > > the read request that is in the main loop of the circleWalk. > > Just one remark here... if you are running in threaded mode, but you also > attempt to read > "manually" from your main loop, the read will return and do nothing, > because: > --- > public int readAll () { > if (isThreaded) return 0; > ... > --- > > Also the Space Wanderer example should contain a Thread.sleep () which > assures that your > main loop is not going to execute too fast. > > Other than that, I agree with John that it would be good to view how much > CPU time does a > process consume. It might be Java but it might be something else as well. > If it's running > in Stage just fine, I think we are hitting a bottleneck somewhere (?). > > Radu. > -- > | Radu Bogdan Rusu | http://rbrusu.com/ > | http://www9.cs.tum.edu/people/rusu/ > | Intelligent Autonomous Systems > | Technische Universitaet Muenchen > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Java-player-users mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-player-users > --=20 Alexandre Henrique Vieira Soares ____________________________________________________ Mestrando em Modelagem Matem=E1tica e Computacional Linha de Pesquisa: Sistemas Inteligentes Cefet-MG Belo Horizonte, Brasil |