From: Radu B. R. <ru...@cs...> - 2009-06-26 10:07:30
|
Dear Erik, Sorry for the late reply. I am forwarding your e-mail to the Javaclient mailing list, maybe some of the other users could help. I am at the moment involved in my doctoral dissertation graduation and have near-0 time for coding/work :) Thanks for understanding, Radu. -------- Original Message -------- Subject: Player Bumper Interface Date: Wed, 17 Jun 2009 16:21:40 -0400 From: Eric Akers <eri...@gm...> To: ru...@cs... Hello, Sorry to bother you with this question. The bumper interface for my program does not appear to be giving me the correct values. I am running my program in Stage (player and stage are 2.0.x version). The program is running on the same machine as the player server. Here is a snippet of code I used just to test the bumpers. robot = new PlayerClient( "localhost", 6665 ); BumperInterface bump = robot.requestInterfaceBumper( 0, PlayerConstants.PLAYER_OPEN_MODE ); robot.runThreaded( -1, -1 ); int c = 0; while( c++ >= 0 ) { while( bump.isDataReady() == false ) { Thread.sleep( 100 ); } System.out.println( c + ") Data: " + bump.getData().getBumpers()[0] + " " + bump.getData().getBumpers()[1] ); } I have this code only because the bumper appeared not to work properly. I test it by manually moving the robot in stage and causing a collision. The Player View program sees all the collisions this way properly. However, the result of the code here is always a zero for both sensors. I am able to read sonar data, set motion commands, and use the blob finder interface, but the bumper interface does not appear to be giving me the proper results. The interface does respond with the proper number of sensors from getBumpers_Count(). I have also used a playerC++ program to output the state of the bumpers and it works fine. I did this to test whether the configuration was bad. Here is a snippet of that code. PlayerClient robot("localhost"); BumperProxy bp(&robot,0); Position2dProxy pp(&robot,0); for(;;) { robot.Read(); std::cout << bp << std::endl; } I have changed the program to use PUSH mode, I have used readAll instead of runThreaded, and I have placed sleeps in the program to slow things down. Nothing has worked so far and I have spent a lot of time trying to find the problem. I like this software and I am hopeful of using it for some robotics research. If you have any idea on what I should look at, I would greatly appreciate your help. Thank you, Eric Akers -- | Radu Bogdan Rusu | http://rbrusu.com/ |