You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
(33) |
Jun
(5) |
Jul
(13) |
Aug
(28) |
Sep
(6) |
Oct
(3) |
Nov
(20) |
Dec
(11) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(1) |
Feb
(17) |
Mar
(35) |
Apr
(1) |
May
(4) |
Jun
(8) |
Jul
(5) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2007 |
Jan
(6) |
Feb
(6) |
Mar
|
Apr
(4) |
May
(1) |
Jun
(1) |
Jul
|
Aug
(9) |
Sep
(3) |
Oct
(2) |
Nov
(4) |
Dec
(9) |
2008 |
Jan
|
Feb
(7) |
Mar
(2) |
Apr
(14) |
May
(9) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
(8) |
Dec
(2) |
2009 |
Jan
(3) |
Feb
(5) |
Mar
(4) |
Apr
(13) |
May
|
Jun
(1) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2010 |
Jan
(3) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(3) |
Oct
|
Nov
(8) |
Dec
(4) |
2011 |
Jan
(3) |
Feb
(4) |
Mar
(7) |
Apr
(2) |
May
(7) |
Jun
(1) |
Jul
|
Aug
|
Sep
(10) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Jorge S. S. <jsa...@gm...> - 2010-11-22 14:48:43
|
Hello all, I have commited the patch submitted by Vitalijs Komasilovs Thank you very much for your contribution, and excuse me for the delay (I´m currently on holydays) Best regards, Jorge Dear Javaclient users, I have updated Actarray and Fiducial interfaces according to actual Player version (3.0.2). This patch includes: - PlayerFiducialItem fields are now correctly decoded as double values, instead of floats (data reading functionality only) - new fields in PlayerActarrayActuator (acceleration and current); - updated PlayerConstants for actarray; - updated ActarrayInterface: data decoding; bug in setSpeed method (POS_CMD was used instead of SPEED_CMD); It would be great to upload this changes to SVN. Best regards, Vitalijs |
From: Sebastian R. <seb...@go...> - 2010-11-15 13:15:16
|
Hello, I am currently using Javaclient3 and porting my CPP code to Java. In one example I use sonar and ranger(laser). I use basically following call order (e.g. for ranger but similar to sonar and laser): ... requestInterfaceRanger (0, PlayerConstants.PLAYER_OPEN_MODE); ... runThreaded(-1,-1) ... readAll() ... isDataReady() ... getData().getRanges() ... For sonar and laser it works fine but when I use ranger it looks like the call isDataReady() is blocking forever. Is there anything to be specifically considered for the ranger interface or does anyone has an idea? Thanks in advance. Sebastian |
From: Vitalijs K. <vit...@gm...> - 2010-09-27 13:48:37
|
Index: javaclient3/FiducialInterface.java =================================================================== --- javaclient3/FiducialInterface.java (revision 99) +++ javaclient3/FiducialInterface.java (working copy) @@ -92,9 +92,13 @@ xdr.close (); // Buffer for reading fiducials - buffer = new byte[PLAYER_FIDUCIAL_MAX_SAMPLES * (4+24*2)]; + // 4 bytes - ID + // 4*2 = 8 bytes - double field + // 6 fields in single PlayerPose3d object + // 2 PlayerPose3d objects + buffer = new byte[PLAYER_FIDUCIAL_MAX_SAMPLES * (4+4*2*6*2)]; // Read fiducials - is.readFully (buffer, 0, fiducialsCount * (4+24*2)); + is.readFully (buffer, 0, fiducialsCount * (4+4*2*6*2)); xdr = new XdrBufferDecodingStream (buffer); xdr.beginDecoding (); PlayerFiducialItem[] pfis = new PlayerFiducialItem[fiducialsCount]; @@ -105,20 +109,20 @@ PlayerPose3d pose = new PlayerPose3d (); PlayerPose3d upose = new PlayerPose3d (); - pose.setPx (xdr.xdrDecodeFloat ()); - pose.setPy (xdr.xdrDecodeFloat ()); - pose.setPz (xdr.xdrDecodeFloat ()); - pose.setProll (xdr.xdrDecodeFloat ()); - pose.setPpitch (xdr.xdrDecodeFloat ()); - pose.setPyaw (xdr.xdrDecodeFloat ()); + pose.setPx (xdr.xdrDecodeDouble()); + pose.setPy (xdr.xdrDecodeDouble()); + pose.setPz (xdr.xdrDecodeDouble()); + pose.setProll (xdr.xdrDecodeDouble()); + pose.setPpitch (xdr.xdrDecodeDouble()); + pose.setPyaw (xdr.xdrDecodeDouble()); - upose.setPx (xdr.xdrDecodeFloat ()); - upose.setPy (xdr.xdrDecodeFloat ()); - upose.setPz (xdr.xdrDecodeFloat ()); - upose.setProll (xdr.xdrDecodeFloat ()); - upose.setPpitch (xdr.xdrDecodeFloat ()); - upose.setPyaw (xdr.xdrDecodeFloat ()); - + upose.setPx (xdr.xdrDecodeDouble ()); + upose.setPy (xdr.xdrDecodeDouble ()); + upose.setPz (xdr.xdrDecodeDouble ()); + upose.setProll (xdr.xdrDecodeDouble ()); + upose.setPpitch (xdr.xdrDecodeDouble ()); + upose.setPyaw (xdr.xdrDecodeDouble ()); + pfi.setPose (pose); pfi.setUpose (upose); Index: javaclient3/structures/actarray/PlayerActarrayActuator.java =================================================================== --- javaclient3/structures/actarray/PlayerActarrayActuator.java (revision 99) +++ javaclient3/structures/actarray/PlayerActarrayActuator.java (working copy) @@ -34,6 +34,10 @@ */ public class PlayerActarrayActuator implements PlayerConstants { + // The acceleration of the actuator in m/s^2 or rad/s^2 depending on the type. + private float acceleration; + // The current of the actuator in A. + private float current; // The position of the actuator in m or rad depending on the type. private float position; // The speed of the actuator in m/s or rad/s depending on the type. @@ -85,4 +89,36 @@ this.state = newState; } -} \ No newline at end of file + /** + * @return The acceleration of the actuator in m/s^2 or rad/s^2 depending on the type. + **/ + public synchronized float getAcceleration() { + return acceleration; + } + + /** + * @param newAcceleration The acceleration of the actuator in m/s^2 or rad/s^2 depending on the type. + * + */ + public synchronized void setAcceleration(float newAcceleration) { + this.acceleration = newAcceleration; + } + + /** + * @return The current of the actuator in A. + **/ + public synchronized float getCurrent() { + return current; + } + + /** + * @param newCurrent The current of the actuator in A. + * + */ + public synchronized void setCurrent(float newCurrent) { + this.current = newCurrent; + } + + + +} Index: javaclient3/structures/PlayerPose.java =================================================================== --- javaclient3/structures/PlayerPose.java (revision 99) +++ javaclient3/structures/PlayerPose.java (working copy) @@ -95,4 +95,9 @@ public synchronized void setPa (double newPa) { this.pa = newPa; } + + @Override + public String toString() { + return "PlayerPose{ [" + px + " " + py + " 0 " + Math.toDegrees(pa) + "]}"; + } } \ No newline at end of file Index: javaclient3/structures/PlayerConstants.java =================================================================== --- javaclient3/structures/PlayerConstants.java (revision 99) +++ javaclient3/structures/PlayerConstants.java (working copy) @@ -247,9 +247,14 @@ public final int PLAYER_ACTARRAY_BRAKES_REQ = 2; public final int PLAYER_ACTARRAY_GET_GEOM_REQ = 3; public final int PLAYER_ACTARRAY_SPEED_REQ = 4; + public final int PLAYER_ACTARRAY_ACCEL_REQ = 5; public final int PLAYER_ACTARRAY_POS_CMD = 1; - public final int PLAYER_ACTARRAY_SPEED_CMD = 2; - public final int PLAYER_ACTARRAY_HOME_CMD = 3; + public final int PLAYER_ACTARRAY_MULTI_POS_CMD = 2; + public final int PLAYER_ACTARRAY_SPEED_CMD = 3; + public final int PLAYER_ACTARRAY_MULTI_SPEED_CMD = 4; + public final int PLAYER_ACTARRAY_HOME_CMD = 5; + public final int PLAYER_ACTARRAY_CURRENT_CMD = 6; + public final int PLAYER_ACTARRAY_MULTI_CURRENT_CMD = 7; public final int PLAYER_ACTARRAY_DATA_STATE = 1; public final int PLAYER_AIO_MAX_INPUTS = 8; Index: javaclient3/ActarrayInterface.java =================================================================== --- javaclient3/ActarrayInterface.java (revision 99) +++ javaclient3/ActarrayInterface.java (working copy) @@ -82,19 +82,23 @@ xdr.close (); // Buffer for reading actuators data - buffer = new byte[PLAYER_ACTARRAY_NUM_ACTUATORS * 12]; + buffer = new byte[PLAYER_ACTARRAY_NUM_ACTUATORS * 24]; // Read actuators data - is.readFully (buffer, 0, actuatorsCount * 12); + is.readFully (buffer, 0, actuatorsCount * 24); xdr = new XdrBufferDecodingStream (buffer); xdr.beginDecoding (); PlayerActarrayActuator[] paas = new PlayerActarrayActuator[actuatorsCount]; for (int i = 0; i < actuatorsCount; i++) { PlayerActarrayActuator paa = new PlayerActarrayActuator (); + //unknown int field, always = 1, probably PLAYER_ACTARRAY_DATA_STATE + xdr.xdrDecodeInt(); paa.setPosition (xdr.xdrDecodeFloat ()); paa.setSpeed (xdr.xdrDecodeFloat ()); + paa.setAcceleration(xdr.xdrDecodeFloat ()); + paa.setCurrent (xdr.xdrDecodeFloat ()); paa.setState (xdr.xdrDecodeByte ()); - + paas[i] = paa; } xdr.endDecoding (); @@ -157,7 +161,7 @@ */ public void setSpeed (int joint, float speed) { try { - sendHeader (PLAYER_MSGTYPE_CMD, PLAYER_ACTARRAY_POS_CMD, 8); + sendHeader (PLAYER_MSGTYPE_CMD, PLAYER_ACTARRAY_SPEED_CMD, 8); XdrBufferEncodingStream xdr = new XdrBufferEncodingStream (8); xdr.beginEncoding (null, 0); xdr.xdrEncodeByte ((byte)joint); |
From: Vitalijs K. <vit...@gm...> - 2010-09-27 13:45:45
|
Dear Javaclient users, I have updated Actarray and Fiducial interfaces according to actual Player version (3.0.2). This patch includes: - PlayerFiducialItem fields are now correctly decoded as double values, instead of floats (data reading functionality only) - new fields in PlayerActarrayActuator (acceleration and current); - updated PlayerConstants for actarray; - updated ActarrayInterface: data decoding; bug in setSpeed method (POS_CMD was used instead of SPEED_CMD); It would be great to upload this changes to SVN. Best regards, Vitalijs |
From: Khaluf <kh...@go...> - 2010-09-24 12:19:16
|
Dear Developer, can you tell me after installing the Player/stage javaclient and the player also how to run the examples which are the main class to run a simulation and how and where to write world and configuration files?? there are 2 test examples on your web page but which class in the client is responsible to run them thanks in advance -- Bests Khaluf |
From: Anthony C. <aj...@ps...> - 2010-07-23 16:50:49
|
Jorge and all, In regards to the player 3.0 updates. It appears that the laser interface now uses pose3d and box3d for the geometry. I created a small patch, but it only required a few small tweaks to update. I can send the patch if someone would want it. Also I created a patch for the wall follow example. The Java code is essentially the same as I only changed the name of the class. The rest of the changes were to the world file to work with Stage 3+. Specifically tested with Stage 3.2.2, Player 3.0.2. But, otherwise, thanks and keep up the good work! Regards, Anthony |
From: Jorge S. S. <jsa...@gm...> - 2010-04-21 22:14:48
|
Hello all, We are updating javaclient to make it works with the latest player/stage versions. By now, just a few interfaces have been updated (IR, sonar, position2D, gripper, Graphics2D and power), but some others should also work with no modifications. The new coded is available on SVN as javaclient3 branch: update to this branch only if you wont to use javaclient with player 3! (it will not work with player 2). You will probably find a lot of incompatibilities with player 3, so please report them and we will try to correct them. Or much better, correct them by yourself and send us a patch! Any help will be very, very welcomed. Best regards, Jorge |
From: Stefano F. <fr...@ph...> - 2010-01-02 14:39:59
|
Dear Radu, thank you for your prompt answer. I was afraid that would be the case. Unfortunately, I do not have the skills needed to contribute to the update, but I do hope there will be one in the future. Cheers, Stefano On 01/01/10, Radu Bogdan Rusu <ru...@cs...> wrote: >Dear Stefano, > >Unfortunately, Javaclient2 is no longer maintained. Provided that the > software is still useful for people out there, we would need to find some > maintainers that are willing to devote time to update the code to the > latest P/S version. > >Cheers, >Radu. > >Stefano Franchi wrote: >> Dear JavaClient 2 users, >> >> I did some experiments (successfully) with Java Client 2 and Player >> version 2.0 and related stage plugin. After upgrading to the latest >> version of player/stage (3.1.0/3.2.2) my code stopped working. Is it >> possible at all to use JavaClient2 (SVN version) with the latest releases >> of player/stage or is it limited to player 2.0.x? >> >> Thanks, >> >> Stefano >> ______________________________________________________________ >> Stefano Franchi >> Department of Philosophy Ph: (979) 862-2211 >> Texas A&M University Fax: (979) 845-0458 >> 305B Bolton Hall fr...@ph... >> College Station, TX 77843-4237 >> >> -------------------------------------------------------------------------- >>---- This SF.Net email is sponsored by the Verizon Developer Community Take >> advantage of Verizon's best-in-class app development support A >> streamlined, 14 day to market process makes app distribution fast and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Java-player-users mailing list >> Jav...@li... >> https://lists.sourceforge.net/lists/listinfo/java-player-users > ______________________________________________________________ Stefano Franchi Department of Philosophy Ph: (979) 862-2211 Texas A&M University Fax: (979) 845-0458 305B Bolton Hall fr...@ph... College Station, TX 77843-4237 |
From: Radu B. R. <ru...@cs...> - 2010-01-02 03:37:39
|
Dear Stefano, Unfortunately, Javaclient2 is no longer maintained. Provided that the software is still useful for people out there, we would need to find some maintainers that are willing to devote time to update the code to the latest P/S version. Cheers, Radu. Stefano Franchi wrote: > Dear JavaClient 2 users, > > I did some experiments (successfully) with Java Client 2 and Player version > 2.0 and related stage plugin. After upgrading to the latest version of > player/stage (3.1.0/3.2.2) my code stopped working. Is it possible at all to > use JavaClient2 (SVN version) with the latest releases of player/stage or is > it limited to player 2.0.x? > > Thanks, > > Stefano > ______________________________________________________________ > Stefano Franchi > Department of Philosophy Ph: (979) 862-2211 > Texas A&M University Fax: (979) 845-0458 > 305B Bolton Hall fr...@ph... > College Station, TX 77843-4237 > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Java-player-users mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-player-users -- | Radu Bogdan Rusu | http://rbrusu.com/ |
From: Stefano F. <fr...@ph...> - 2010-01-02 02:57:19
|
Dear JavaClient 2 users, I did some experiments (successfully) with Java Client 2 and Player version 2.0 and related stage plugin. After upgrading to the latest version of player/stage (3.1.0/3.2.2) my code stopped working. Is it possible at all to use JavaClient2 (SVN version) with the latest releases of player/stage or is it limited to player 2.0.x? Thanks, Stefano ______________________________________________________________ Stefano Franchi Department of Philosophy Ph: (979) 862-2211 Texas A&M University Fax: (979) 845-0458 305B Bolton Hall fr...@ph... College Station, TX 77843-4237 |
From: Mario M. <jmm...@ya...> - 2009-12-29 12:48:32
|
Hi. I am a new user in this project and I have some problems with SimulationInterface. I am trying to use this class to reset the robot position in an evolutionary experiment but I get this message when I use "get2DPose" or "set2DPose": warning : decoding failed on message to 31:0 with type 2 I have read in this java-player-user list that it is necessary to call "isPose2DReady" method previously but when I do it I always receive "false". I am using Player 2.0.5 and Stage 2.04 along with the last SVN version of Javaclient2. Can someone help me? Thanks and Merry Christmas |
From: Juan A. B. M. <br...@ju...> - 2009-12-19 22:03:17
|
Hi again, I am using some maps from other projects but I would like to learn how to create a new map from a real place to use after with javaclient. In the lab, I have a real pioneer robot and I would like to create a map from a floor in a building to use after with Stage. Anybody can help me? Cheers -- View this message in context: http://old.nabble.com/How-to-create-a-Map-in-Stage-tp26858991p26858991.html Sent from the java-player-users mailing list archive at Nabble.com. |
From: Juan A. B. M. <br...@ju...> - 2009-12-19 21:59:36
|
Hi, I am a newbie user using this project. I would like to use Laser. In the examples from the website the Pioneer was configurated with sonar system but I would like to use Laser. Anybody has a simple example using a Laser? Cheers -- View this message in context: http://old.nabble.com/Using-Laser-with-JavaClient-tp26858959p26858959.html Sent from the java-player-users mailing list archive at Nabble.com. |
From: me w. <tan...@ho...> - 2009-07-30 16:18:47
|
Is it possible that ANT compile with a specific version of Java? I think that maybe you wrote your code according one 's latest version of java, but ANT tries to compile it with an older version, so it doesn't understand some recent features like generic to specification (the '<>'). Look in ANT if it exists a field that specifies the java version to compile with. (I've never used ANT, so I just can make assumptions...) Have a nice day! Skuld PS: sorry to not write that in Nabble, but I didn't find out this topic ... -_-' > Date: Mon, 27 Jul 2009 14:59:36 +0200 > From: ru...@cs... > To: bus...@gm... > CC: jav...@li... > Subject: [Java-player-users] [Fwd: about Javaclient] > > Jose, I am re-directing your e-mail to the Javaplayer users mailing list, hoping that someone can provide a solution to > your problem. > > Cheers, > Radu. > > -------- Original Message -------- > Subject: about Javaclient > Date: Mon, 27 Jul 2009 14:02:33 +0200 > From: José Bustamante <bus...@gm...> > To: ru...@cs..., ma...@ro... > > > > Hello, please I would like some help. > when I compile with ANT I get some errors, but first of all > I would like to solve this one: > > protected Vector<PlayerDevice> deviceList = new Vector<PlayerDevice> (); > > The type Vector is not generic; it cannot be parametrized with arguments > <PlayerDevice> > > please how could I solve it? > > thank you so much > > JOSE > > -- > | Radu Bogdan Rusu | http://rbrusu.com/ > > ------------------------------------------------------------------------------ > _______________________________________________ > Java-player-users mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-player-users _________________________________________________________________ Découvrez toutes les possibilités de communication avec vos proches http://www.microsoft.com/windows/windowslive/default.aspx |
From: Radu B. R. <ru...@cs...> - 2009-07-27 12:59:50
|
Jose, I am re-directing your e-mail to the Javaplayer users mailing list, hoping that someone can provide a solution to your problem. Cheers, Radu. -------- Original Message -------- Subject: about Javaclient Date: Mon, 27 Jul 2009 14:02:33 +0200 From: José Bustamante <bus...@gm...> To: ru...@cs..., ma...@ro... Hello, please I would like some help. when I compile with ANT I get some errors, but first of all I would like to solve this one: protected Vector<PlayerDevice> deviceList = new Vector<PlayerDevice> (); The type Vector is not generic; it cannot be parametrized with arguments <PlayerDevice> please how could I solve it? thank you so much JOSE -- | Radu Bogdan Rusu | http://rbrusu.com/ |
From: Leo N. <leo...@gm...> - 2009-07-24 16:51:51
|
Hi jose We at University Jaume I of Castellon have been able to migrate part of the java client to be j2me compliant. It should be no problem for you but if you preffer i can try to send you a copy of the library we i go back to the office next week. Anyway we are not going to mantain this port as we are in the final stages to deliver a new fully rebuild of the java client, also able to be used under j2me. Hope you can wait ;) Bests Leo El 24 jul 2009 3:06 p.m., "José Bustamante" <bus...@gm...> escribió: Hi, my name is Jose Bustamante, I am student at the University of Granada in Spain. Please I would like to know if it is posible to run a midlet( java client) to connect to a Player server. Thank you very much JOSE ------------------------------------------------------------------------------ _______________________________________________ Java-player-users mailing list Jav...@li... https://lists.sourceforge.net/lists/listinfo/java-player-users |
From: José B. <bus...@gm...> - 2009-07-24 13:06:27
|
Hi, my name is Jose Bustamante, I am student at the University of Granada in Spain. Please I would like to know if it is posible to run a midlet( java client) to connect to a Player server. Thank you very much JOSE |
From: Jeff R. <drz...@gm...> - 2009-07-22 18:15:02
|
Hello, I've got a client written using the latest javaclient SVN connecting to a Player server (version 2.0.4) that all it does is try and read localized hypothesis and print the resulting pose's Xs, Ys & angles. However it doesn't act as expected. Using Stage for my sim, no matter where I put my robot the X value ALWAYS reads "1.4E-45", but the Y value seems to be correct. In addition the angle (using getPa() ) seems to return the X value instead of the angle (seems odd!). Not only that, but for some reason my calls to "isDataReady" always fail after one success... I've implemented a similar client in c++ for reference to check to see if was a problem with my socket/server/etc and it seems to work just fine (the c++ code is also found below) PS I'm new to Player's javaclient implementation so if I did something stupid cut me some slack ;-) Jeff ---------------------------------------- java source --------------------------------------------- import javaclient2.*; import javaclient2.structures.PlayerConstants; import javaclient2.structures.PlayerPose; import javaclient2.structures.localize.PlayerLocalizeHypoth; public class TestClient { public static void main(String[] args) { PlayerClient robot = new PlayerClient("localhost", 6665); LocalizeInterface loc = robot.requestInterfaceLocalize(0, PlayerConstants.PLAYER_OPEN_MODE); PlayerPose pose = new PlayerPose(); for(;;) { robot.readAll(); if(loc.isDataReady()) { System.out.println("cnt: " + loc.getData().getHypoths_count()); for(PlayerLocalizeHypoth hyp : loc.getData().getHypoths()) { pose = hyp.getMean(); System.out.println(pose.getPx() + ", " + pose.getPy() + ", " + pose.getPa()); } } } } } ---------------------------------------- java output --------------------------------------------- Jul 22, 2009 1:52:10 PM javaclient2.PlayerClient <init> INFO: Player v.2.0.4 selected devices [localhost:6665]: 6665:simulation:0 (stage) 6665:map:0 (stage) 6665:localize:0 (fakelocalize) 6665:position2d:0 (stage) 6665:bumper:0 (stage) 6665:laser:0 (stage) 6665:position2d:1 (vfh) cnt: 1 1.4E-45, 3.3517683, -2.51375 ... stops here ... ---------------------------------------- c++ source --------------------------------------------- #include <iostream> #include <libplayerc++/playerc++.h> int main(int argc, char *argv[]) { using namespace PlayerCc; PlayerClient robot("localhost"); LocalizeProxy locProx(&robot,0); player_localize_hypoth_t hyp; player_pose_t pose; for(;;) { robot.Read(); if(locProx.GetNumHypoths() > 0) { // since i'm using fakelocalize driver I only get 1 hypothesis hyp = locProx.GetHypoth(0); pose = hyp.mean; std::cout << pose.px << " " << pose.py << " " << pose.pa << std::endl; } } } ---------------------------------------- c++ source --------------------------------------------- -2.51375, 3.3517683, 2.7775 -2.51375, 3.3517683, 2.7775 -2.51375, 3.3517683, 2.7775 -2.51375, 3.3517683, 2.7775 -2.51375, 3.3517683, 2.7775 -2.51375, 3.3517683, 2.7775 -2.51375, 3.3517683, 2.7775 ... keeps going ... |
From: Holger E. <hol...@da...> - 2009-07-09 15:42:35
|
Thanks, in the meanwhile I've found a solution by searching in the mailing-list archive and in player's interface-description. For instance, when changing the setVelocity in Position2DInterface as follows, the setSpeed-command works: public void setVelocity (PlayerPose vel, int state) { try { sendHeader (PLAYER_MSGTYPE_CMD, PLAYER_POSITION2D_CMD_VEL, 24+4); XdrBufferEncodingStream xdr = new XdrBufferEncodingStream (24+4); xdr.beginEncoding (null, 0); xdr.xdrEncodeDouble(vel.getPx ()); xdr.xdrEncodeDouble (vel.getPy ()); xdr.xdrEncodeDouble (vel.getPa ()); xdr.xdrEncodeByte ((byte)state); ... (and of course, you should not use 10.0f for translational speed, as given in the example below :-) Best Holger -----Original Message----- From: Radu Bogdan Rusu [mailto:ru...@cs...] Sent: Thursday, July 09, 2009 9:42 AM To: jav...@li...; Holger Endert Subject: [Fwd: [JavaPlayerClient] Question] Holger, I'm redirecting your message to the appropriate java-player-users mailing list. Radu. -------- Original Message -------- Subject: [JavaPlayerClient] Question Date: Thu, 9 Jul 2009 09:00:05 +0200 From: Holger Endert <hol...@da...> To: 'ru...@cs...' <ru...@cs...>, 'ma...@ro...' <ma...@ro...> Hello Mr. Rusu & Mr. Batalin, I have a question concerning the compatibility of your java-based player-client with the current version of player (v2.2.0). It seems that connection to player works (a list of devices is printed on the console output), but reading and sending data to player causes the client to crash. My first simple example should let a robot move for a few seconds forwards via the position2d interface, like this: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PlayerClient client = new PlayerClient("192.168.1.13", 6665); Position2DInterface ifc = client.requestInterfacePosition2D(0, PlayerConstants.PLAYER_OPEN_MODE); System.out.println("START MOVEMENT"); ifc.setSpeed(10f, 0.0f); try { Thread.sleep(10000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("STOP MOVEMENT"); ifc.setSpeed(0.0f, 0.0f); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Do you know if there are any issues with compatibility, and if so, (how) can I fix them? Do I have some bugs in my code? Are there any code-examples that may help? Thanks in advance and best wishes Holger Endert ----------------------------------------- Dipl. Inform. Holger Endert DAI-Labor - Technische Universität Berlin Sekretariat TEL 14, Ernst-Reuter-Platz 7, 10587 Berlin Fon: +49 30 314-74079 Fax: +49 30 314 21799 hol...@da... http://www.dai-labor.de http://www.dainamite.de -- | Radu Bogdan Rusu | http://rbrusu.com/ |
From: Radu B. R. <ru...@cs...> - 2009-07-09 08:07:26
|
Holger, I'm redirecting your message to the appropriate java-player-users mailing list. Radu. -------- Original Message -------- Subject: [JavaPlayerClient] Question Date: Thu, 9 Jul 2009 09:00:05 +0200 From: Holger Endert <hol...@da...> To: 'ru...@cs...' <ru...@cs...>, 'ma...@ro...' <ma...@ro...> Hello Mr. Rusu & Mr. Batalin, I have a question concerning the compatibility of your java-based player-client with the current version of player (v2.2.0). It seems that connection to player works (a list of devices is printed on the console output), but reading and sending data to player causes the client to crash. My first simple example should let a robot move for a few seconds forwards via the position2d interface, like this: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PlayerClient client = new PlayerClient("192.168.1.13", 6665); Position2DInterface ifc = client.requestInterfacePosition2D(0, PlayerConstants.PLAYER_OPEN_MODE); System.out.println("START MOVEMENT"); ifc.setSpeed(10f, 0.0f); try { Thread.sleep(10000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("STOP MOVEMENT"); ifc.setSpeed(0.0f, 0.0f); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Do you know if there are any issues with compatibility, and if so, (how) can I fix them? Do I have some bugs in my code? Are there any code-examples that may help? Thanks in advance and best wishes Holger Endert ----------------------------------------- Dipl. Inform. Holger Endert DAI-Labor - Technische Universität Berlin Sekretariat TEL 14, Ernst-Reuter-Platz 7, 10587 Berlin Fon: +49 30 314-74079 Fax: +49 30 314 21799 hol...@da... http://www.dai-labor.de http://www.dainamite.de -- | Radu Bogdan Rusu | http://rbrusu.com/ |
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/ |
From: kevinl <liu...@gm...> - 2009-04-30 06:24:10
|
Hi everyone, I have a problem in using the HeadingControl, these are part of my code. static HeadingControl p2hc=null; robot = new PlayerClient ("localhost", 6665); posi = robot.requestInterfacePosition2D (0, PlayerConstants.PLAYER_OPEN_MODE); //position2d interface p2hc = new HeadingControl(posi); //HeadingControl p2hc.setDiffHeading(90); After call the "p2hc.setDiffHeading(90);", the robot in stage will continue change its heading randomly. I am working on the player2.05, stage2.04 and Javaclient2.0. I use the robot simulated in stage2.04. Could you give me some advice on this problem? Thanks a lot, kevin -- View this message in context: http://www.nabble.com/Problems-with-HeadingControl-tp23310594p23310594.html Sent from the java-player-users mailing list archive at Nabble.com. |
From: kevinl <liu...@gm...> - 2009-04-20 15:51:58
|
Hi Skuld, Thanks very much.^_^ I get it. So the thread will keep calling the read() until yield() or sleep(). Yours sincerely, kevin. Skuld wrote: > > ^^ > > Sure I can. > As I told you in my first reply, you have to call the Read method to fill > up your structure's fields, > from a communication pipe with Player. > > That is the code of the JavaClient (2.0.1 version, but all versions should > work the same.) > > public void runThreaded (long millis, int nanos) { > if (isThreaded) { > System.err.println ("[PlayerClient]: A second call for > runThreaded, ignoring!"); > return; > } > this.millis = millis; > this.nanos = nanos; > isThreaded = true; > this.start (); > } > > As you can see, when you call RunThreaded, you just set some special > fields before > launching the start method. I guess you know how works Threads in java, so > I'll just show you > the run method (which is called by the start method): > > public void run () { > try { > while (isThreaded) { > if (this.datamode == PLAYER_DATAMODE_PULL) { > this.requestData (); > while (read () != PLAYER_MSGTYPE_SYNCH && isThreaded); > } else > // while (is.available () != 0) > // while (read () != PLAYER_MSGTYPE_SYNCH && isThreaded); > read (); > > if (millis < 0) > Thread.yield (); > else > if (nanos <= 0) > Thread.sleep (millis); > else > Thread.sleep (millis, nanos); > } > } catch (InterruptedException e) { throw new PlayerException (e); > } > // } catch (IOException e) { throw new PlayerException (e); } > } > > Do you understand? This function have a while's loop. This loop first wait > for data from Player, > and dispatch it in the structures's fields with a read() 's loop. There is > the call of the Read function. > (an equivalent to be meticulous, because Read function is available in C > library, but in Java, > read is a private function. You just can call it by readAll(), which does > the same things that the C one does, > and the simple read does too -but with verifications.) > > So, in fact when you call RunThreaded, one Thread is specially created to > catch information from > Player and dispatch it into structures, for the other Thread (because > threads share memory.), so for your code, > so you doesn't have to call Read() anymore. And you still have > informations from Player. > > Here it is ! > I hope I was clear enough ^^ If I wasn't, tell me so. > Have a nice day! > Skuld > > > kevinl wrote: >> >> Hi Skuld, >> Thank you for your advice, I call runThreaded(-1,-1) before my code and I >> can get the data now. And I'm sorry to reply your message so late. And I >> am confused why the fuction of runThreaded(-1,-1) will call an equivalent >> of Read. Could you tell me why? >> >> Thanks a lot, >> kevin >> >> > > -- View this message in context: http://www.nabble.com/Problems-with-laserinterface-tp22986701p23139377.html Sent from the java-player-users mailing list archive at Nabble.com. |
From: Skuld <tan...@ho...> - 2009-04-20 12:56:33
|
^^ Sure I can. As I told you in my first reply, you have to call the Read method to fill up your structure's fields, from a communication pipe with Player. That is the code of the JavaClient (2.0.1 version, but all versions should work the same.) public void runThreaded (long millis, int nanos) { if (isThreaded) { System.err.println ("[PlayerClient]: A second call for runThreaded, ignoring!"); return; } this.millis = millis; this.nanos = nanos; isThreaded = true; this.start (); } As you can see, when you call RunThreaded, you just set some special fields before launching the start method. I guess you know how works Threads in java, so I'll just show you the run method (which is called by the start method): public void run () { try { while (isThreaded) { if (this.datamode == PLAYER_DATAMODE_PULL) { this.requestData (); while (read () != PLAYER_MSGTYPE_SYNCH && isThreaded); } else // while (is.available () != 0) // while (read () != PLAYER_MSGTYPE_SYNCH && isThreaded); read (); if (millis < 0) Thread.yield (); else if (nanos <= 0) Thread.sleep (millis); else Thread.sleep (millis, nanos); } } catch (InterruptedException e) { throw new PlayerException (e); } // } catch (IOException e) { throw new PlayerException (e); } } Do you understand? This function have a while's loop. This loop first wait for data from Player, and dispatch it in the structures's fields with a read() 's loop. There is the call of the Read function. (an equivalent to be meticulous, because Read function is available in C library, but in Java, read is a private function. You just can call it by readAll(), which does the same things that the C one does, and the simple read does too -but with verifications.) So, in fact when you call RunThreaded, one Thread is specially created to catch information from Player and dispatch it into structures, for the other Thread (because threads share memory.), so for your code, so you doesn't have to call Read() anymore. And you still have informations from Player. Here it is ! I hope I was clear enough ^^ If I wasn't, tell me so. Have a nice day! Skuld kevinl wrote: > > Hi Skuld, > Thank you for your advice, I call runThreaded(-1,-1) before my code and I > can get the data now. And I'm sorry to reply your message so late. And I > am confused why the fuction of runThreaded(-1,-1) will call an equivalent > of Read. Could you tell me why? > > Thanks a lot, > kevin > > -- View this message in context: http://www.nabble.com/Problems-with-laserinterface-tp22986701p23136166.html Sent from the java-player-users mailing list archive at Nabble.com. |
From: kevinl <liu...@gm...> - 2009-04-17 02:57:07
|
Hi Skuld, Thank you for your advice, I call runThreaded(-1,-1) before my code and I can get the data now. And I'm sorry to reply your message so late. And I am confused why the fuction of runThreaded(-1,-1) will call an equivalent of Read. Could you tell me why? Thanks a lot, kevin Skuld wrote: > > What is your version of JavaClient? > > I don't work a lot on JavaClient, but I know that you have to call > (directly or not) > a function whose name is Read() (PlayerClient in the c++ native library), > in order to retrieve data from > Player/Stage, to fill up fields of your structure, and then you can reach > data by > functions like getRanges(). > So your first call of getRanges, "lsri.getData().getRanges();", can't fill > these fields. It's useless. > Maybe you have to call readAll() (of the class PlayerClient in javaClient) > if you're not in threaded > mode, or call runThreaded(0,0) if you implemented the Runnable interface. > Those functions will call > an equivalent of Read. > I guess that "isDataReady" doesn't ask a reading from Player/Stage, but > only check if, in the most recent data retrieved, there is data about > laser. But you > still have to retrieve it. > > If it doesn't work, check your "robot" creation. Maybe it's your > nullpointer error' source. > > Do you know the name of the function which cause the error? > > > kevinl wrote: >> >> Hi all, >> I don't know how to use the laserInterface, so I run the following code >> for a try: >> lsri = robot.requestInterfaceLaser (0, PlayerConstants.PLAYER_OPEN_MODE); >> while(lsri.isDataReady()); >> lnum=lsri.getData().getRanges_count(); >> lsri.getData().getRanges(); >> ldata=lsri.getData().getRanges(); >> >> I get the error of "NullPointerException". Could you advise me on how to >> use the laserInterface? And I am confused with the method "public void >> readData(PlayerMsgHdr header)" , how can I get a PlayerMsgHdr variable? >> >> Thanks a lot, >> kevin. >> >> > > -- View this message in context: http://www.nabble.com/Problems-with-laserinterface-tp22986701p23090213.html Sent from the java-player-users mailing list archive at Nabble.com. |