From: Alexandre H. V. S. <ahv...@gm...> - 2007-01-30 00:57:04
|
Hi, I'm trying do run a Java application with Gazebo and I noticed that the execution of the application is making Gazebo be slow. The robot is not showing a continuous movement, it is "jumping" along the time. I have already noticed that the Gazebo timer (the time that is shown on the interface) is stopping, the same as the robot. Running " glxinfo | grep rendering " command I got " direct rendering: Yes = " . I run the CircleWalk example ( http://java-player.sourceforge.net/docs/howto.pdf ) on Gazebo using Javaclient and everything was right. Looking the Wall Follower example ( http://java-player.sourceforge.net/examples/2.x/SpaceWandererExample.tgz , which were strange, with the robot 'jumping'), I saw a ' robot.runThreaded(-1, -1);' command. When I put this command on CircleWalk example the same as Wall Follower example occured... the robot started jumping... So, I tried to remove the 'robot.runThreaded (-1, -1);' from Wall Follower example and the robot stopped moving... the application only works with tha= t command. I run the same application on Stage and all works fine. Is there something I can do to make the robot movement continuous on Gazebo= ? My computer is an Athlon XP 2400+, 512MB RAM, my video card is a GeForce4 M= X 4000 AGP 8x with 128MB of memory. Thanks. PS.: The Gazebo application can be found in http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/WallFollowerExampleG= azebo.zipand the Stage application can be found in http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/WallFollowerExampleS= tage.zip. Both n<http://www.lsi.cefetmg.br/%7Eahvsoares/robotica/exemplos/WallFollowe= rExample-Gazebo.tgz>eeds Javaclient API. The videos running Gazebo application can be found in http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Gazebo.ogg and the Stage video in http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Stage.ogg . --=20 Alexandre Henrique Vieira Soares ____________________________________________________ Mestrando em Modelagem Matem=E1tica e Computacional Linha de Pesquisa: Sistemas Inteligentes Cefet-MG Belo Horizonte, Brasil |
From: John O. <joh...@gm...> - 2007-01-30 11:31:24
|
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. =20 This could be wrong, since after each read request it waits for a packet I would have thought that this would act to slow it down since it cant issue = a new read until the previous has completed. However I would try doing something like runThreaded (100,-1), this will do 10 reads per second and maybe also do a sleep in the main control loop to avoid spamming hundreds o= f commands to the position driver. =20 If this does not work try doing some print statements to figure out how man= y request/commands you are sending and also run "top" at the same time to see how the processor and memory usage is, one problem with java is it does lov= e to eat memory. I wouldn=E2=80=99t have thought it was memory as you are ru= nning a small program but looking at whether java, player or gazebo are using all the cpu usage would be useful. let us know the results. Thanks John Alexandre Henrique Vieira Soares wrote: >=20 > Hi, I'm trying do run a Java application with Gazebo and I noticed that > the > execution of the application is making Gazebo be slow. >=20 > The robot is not showing a continuous movement, it is "jumping" along the > time. I have already noticed that the Gazebo timer (the time that is show= n > on the interface) is stopping, the same as the robot. >=20 > Running " glxinfo | grep rendering " command I got " direct rendering: Ye= s > " > . >=20 > I run the CircleWalk example ( > http://java-player.sourceforge.net/docs/howto.pdf ) on Gazebo using > Javaclient and everything was right. >=20 > Looking the Wall Follower example ( > http://java-player.sourceforge.net/examples/2.x/SpaceWandererExample.tgz = , > which were strange, with the robot 'jumping'), I saw a ' > robot.runThreaded(-1, -1);' command. >=20 > When I put this command on CircleWalk example the same as Wall Follower > example occured... the robot started jumping... >=20 > So, I tried to remove the 'robot.runThreaded (-1, -1);' from Wall Followe= r > example and the robot stopped moving... the application only works with > that > command. >=20 > I run the same application on Stage and all works fine. >=20 > Is there something I can do to make the robot movement continuous on > Gazebo? >=20 > My computer is an Athlon XP 2400+, 512MB RAM, my video card is a GeForce4 > MX > 4000 AGP 8x with 128MB of memory. >=20 > Thanks. >=20 > PS.: The Gazebo application can be found in > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/WallFollowerExampl= eGazebo.zipand > the Stage application can be found in > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/WallFollowerExampl= eStage.zip. > Both > n<http://www.lsi.cefetmg.br/%7Eahvsoares/robotica/exemplos/WallFollowerEx= ample-Gazebo.tgz>eeds > Javaclient API. The videos running Gazebo application can be found in > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Gazebo.ogg and the > Stage video in > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Stage.ogg . >=20 > --=20 > Alexandre Henrique Vieira Soares > ____________________________________________________ > Mestrando em Modelagem Matem=C3=A1tica e Computacional > Linha de Pesquisa: Sistemas Inteligentes > Cefet-MG > Belo Horizonte, Brasil >=20 > ------------------------------------------------------------------------- > 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 >=20 --=20 View this message in context: http://www.nabble.com/Gazebo-is-running-stran= ge-tf3139391.html#a8707694 Sent from the java-player-users mailing list archive at Nabble.com. |
From: Radu B. R. <ru...@cs...> - 2007-01-30 12:35:12
|
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 |
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 |
From: John O. <joh...@gm...> - 2007-01-30 15:56:01
|
**In response to private message** I think there are a number of things going on here.=20 First was it me but you were getting the same issues when you were not usin= g java at all. At one point in the gazeboOnly video the clock stops at 59.2 for about 3 seconds for no apparent reason. To me this seems to point to some issue with gazebo/stage and not java. Secondly I presume the stage video was running a simple algorithm but java was consuming all the spare cpu time it could by the look of it. Your recorder program was taking 20%ish but if that was not there I think java would have taken it anyway. Having run it on my system with runThread(-1,-1) it took 99.9% cpu usage, although it didn=E2=80=99t seem t= o slow the system down at all, java must do something a bit weird with its yielding, to take 99.9% cpu time but not slow things down. However running with (1,-1) reduced cpu usage to 18%. So I would probably recommend callin= g runTreaded with some reasonable values so that java does not do its cpu eating thing. However again I do not think that Java is the issue since the problem appeared to exist in the gazeboOnly video too, its just more noticeable whe= n java is running, probably since java is taking more processing power. John Alexandre Henrique Vieira Soares wrote: >=20 > Hi, I'm trying do run a Java application with Gazebo and I noticed that > the > execution of the application is making Gazebo be slow. >=20 > The robot is not showing a continuous movement, it is "jumping" along the > time. I have already noticed that the Gazebo timer (the time that is show= n > on the interface) is stopping, the same as the robot. >=20 > Running " glxinfo | grep rendering " command I got " direct rendering: Ye= s > " > . >=20 > I run the CircleWalk example ( > http://java-player.sourceforge.net/docs/howto.pdf ) on Gazebo using > Javaclient and everything was right. >=20 > Looking the Wall Follower example ( > http://java-player.sourceforge.net/examples/2.x/SpaceWandererExample.tgz = , > which were strange, with the robot 'jumping'), I saw a ' > robot.runThreaded(-1, -1);' command. >=20 > When I put this command on CircleWalk example the same as Wall Follower > example occured... the robot started jumping... >=20 > So, I tried to remove the 'robot.runThreaded (-1, -1);' from Wall Followe= r > example and the robot stopped moving... the application only works with > that > command. >=20 > I run the same application on Stage and all works fine. >=20 > Is there something I can do to make the robot movement continuous on > Gazebo? >=20 > My computer is an Athlon XP 2400+, 512MB RAM, my video card is a GeForce4 > MX > 4000 AGP 8x with 128MB of memory. >=20 > Thanks. >=20 > PS.: The Gazebo application can be found in > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/WallFollowerExampl= eGazebo.zipand > the Stage application can be found in > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/WallFollowerExampl= eStage.zip. > Both > n<http://www.lsi.cefetmg.br/%7Eahvsoares/robotica/exemplos/WallFollowerEx= ample-Gazebo.tgz>eeds > Javaclient API. The videos running Gazebo application can be found in > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Gazebo.ogg and the > Stage video in > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Stage.ogg . >=20 > --=20 > Alexandre Henrique Vieira Soares > ____________________________________________________ > Mestrando em Modelagem Matem=C3=A1tica e Computacional > Linha de Pesquisa: Sistemas Inteligentes > Cefet-MG > Belo Horizonte, Brasil >=20 > ------------------------------------------------------------------------- > 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 >=20 --=20 View this message in context: http://www.nabble.com/Gazebo-is-running-stran= ge-tf3139391.html#a8709212 Sent from the java-player-users mailing list archive at Nabble.com. |
From: Alexandre H. V. S. <ahv...@gm...> - 2007-01-30 23:00:43
|
I'll try to make a movie with a digital camera, so the act of filming doesn't interfere the simulation. On older tests running only Gazebo works fine... Again, thank you so much!!! :-) 2007/1/30, John Oliver <joh...@gm...>: > > > **In response to private message** > > I think there are a number of things going on here. > > First was it me but you were getting the same issues when you were not > using > java at all. At one point in the gazeboOnly video the clock stops at 59.= 2 > for about 3 seconds for no apparent reason. To me this seems to point to > some issue with gazebo/stage and not java. > > Secondly I presume the stage video was running a simple algorithm but jav= a > was consuming all the spare cpu time it could by the look of it. Your > recorder program was taking 20%ish but if that was not there I think java > would have taken it anyway. Having run it on my system with > runThread(-1,-1) it took 99.9% cpu usage, although it didn't seem to slow > the system down at all, java must do something a bit weird with its > yielding, to take 99.9% cpu time but not slow things down. However > running > with (1,-1) reduced cpu usage to 18%. So I would probably recommend > calling > runTreaded with some reasonable values so that java does not do its cpu > eating thing. > > However again I do not think that Java is the issue since the problem > appeared to exist in the gazeboOnly video too, its just more noticeable > when > java is running, probably since java is taking more processing power. > > John > > > > Alexandre Henrique Vieira Soares wrote: > > > > Hi, I'm trying do run a Java application with Gazebo and I noticed that > > the > > execution of the application is making Gazebo be slow. > > > > The robot is not showing a continuous movement, it is "jumping" along > the > > time. I have already noticed that the Gazebo timer (the time that is > shown > > on the interface) is stopping, the same as the robot. > > > > Running " glxinfo | grep rendering " command I got " direct rendering: > Yes > > " > > . > > > > I run the CircleWalk example ( > > http://java-player.sourceforge.net/docs/howto.pdf ) on Gazebo using > > Javaclient and everything was right. > > > > Looking the Wall Follower example ( > > http://java-player.sourceforge.net/examples/2.x/SpaceWandererExample.tg= z, > > which were strange, with the robot 'jumping'), I saw a ' > > robot.runThreaded(-1, -1);' command. > > > > When I put this command on CircleWalk example the same as Wall Follower > > example occured... the robot started jumping... > > > > So, I tried to remove the 'robot.runThreaded (-1, -1);' from Wall > Follower > > example and the robot stopped moving... the application only works with > > that > > command. > > > > I run the same application on Stage and all works fine. > > > > Is there something I can do to make the robot movement continuous on > > Gazebo? > > > > My computer is an Athlon XP 2400+, 512MB RAM, my video card is a > GeForce4 > > MX > > 4000 AGP 8x with 128MB of memory. > > > > Thanks. > > > > PS.: The Gazebo application can be found in > > > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/WallFollowerExampl= eGazebo.zipand > > the Stage application can be found in > > > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/WallFollowerExampl= eStage.zip > . > > Both > > n< > http://www.lsi.cefetmg.br/%7Eahvsoares/robotica/exemplos/WallFollowerExam= ple-Gazebo.tgz > >eeds > > Javaclient API. The videos running Gazebo application can be found in > > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Gazebo.ogg and > the > > Stage video in > > http://www.lsi.cefetmg.br/~ahvsoares/robotica/exemplos/Stage.ogg . > > > > -- > > Alexandre Henrique Vieira Soares > > ____________________________________________________ > > Mestrando em Modelagem Matem=E1tica e Computacional > > Linha de Pesquisa: Sistemas Inteligentes > > Cefet-MG > > Belo Horizonte, Brasil > > > > > ------------------------------------------------------------------------- > > 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 > > > > > > -- > View this message in context: > http://www.nabble.com/Gazebo-is-running-strange-tf3139391.html#a8709212 > Sent from the java-player-users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > 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 |