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. |