From: John O. <joh...@gm...> - 2006-08-01 16:16:13
|
I have been having some trouble with getting setPosition to work on a Position2DInterface. (Player/stage 2.0.1 and Javaclient 2.0.1) Taking a quick(well perhaps not that quick) look at the code in player the pack function (player_position2d_cmd_pack) it appears to look for both a position command and a velocity in the message: ... if(xdr_player_pose_t(&xdrs,&msg->pos) != 1) return(-1); if(xdr_player_pose_t(&xdrs,&msg->vel) != 1) return(-1); if(xdr_u_char(&xdrs,&msg->state) != 1) return(-1); ... while the java version only sends the position(Position2DInterface.setPosition), and from what I can tell this is leading to my "warning : decoding failed on message to 4:1 with type 2" messages. Have I made a mistake here or is this something to be patched? And is it a player problem or JavaClient? My instinct is that player should not be looking for a velocity in a position command however I do not entirely understand the P/S message formats and wanted confirmation that this was the case(or not). thanks John -- View this message in context: http://www.nabble.com/setPosition-message-format-tf2034617.html#a5597853 Sent from the java-player-users forum at Nabble.com. |
From: Radu B. R. <ru...@cs...> - 2006-08-01 17:32:37
|
John, that sounds about right, but before I start digging and debugging, would it be possible to try it again using HEAD (CVS) Player/Stage and SVN Javaclient ? There were quite a few bugs that were fixed in the repository since the last official version, and it might be that yours was fixed too. If it still doesn't work, I'd be more than happy to fix it. Now if I could only make the day 48h instead of 24h, maybe I could write some documentation for it as well. ;) Cheers, Radu. John Oliver wrote: > I have been having some trouble with getting setPosition to work on a > Position2DInterface. (Player/stage 2.0.1 and Javaclient 2.0.1) > > Taking a quick(well perhaps not that quick) look at the code in player the > pack function (player_position2d_cmd_pack) it appears to look for both a > position command and a velocity in the message: > > ... > if(xdr_player_pose_t(&xdrs,&msg->pos) != 1) > return(-1); > if(xdr_player_pose_t(&xdrs,&msg->vel) != 1) > return(-1); > if(xdr_u_char(&xdrs,&msg->state) != 1) > return(-1); > ... > > while the java version only sends the > position(Position2DInterface.setPosition), and from what I can tell this is > leading to my "warning : decoding failed on message to 4:1 with type 2" > messages. > > Have I made a mistake here or is this something to be patched? And is it a > player problem or JavaClient? My instinct is that player should not be > looking for a velocity in a position command however I do not entirely > understand the P/S message formats and wanted confirmation that this was the > case(or not). > > thanks > > John -- | Radu Bogdan Rusu | http://rbrusu.com/ | http://www9.cs.tum.edu/people/rusu/ | Intelligent Autonomous Systems | Technische Universitaet Muenchen |
From: John O. <joh...@gm...> - 2006-08-02 18:33:04
|
Hopefuly I will get around to doing this at some point. But I think it should still exist as the Javaclient still only sends the position in the latest svn version. However looking at the P/S cvs repo I cant see the pack functions that exist in the tar'd distrobutions(in the libplayerxdr directory) the functiontable.c still refers to it but I cant find it(player_position2d_cmd_pack) anywhere to verify that it is still looking for a velocity command. Anyway this may become clear once I get a chance to test it. thanks again John -- View this message in context: http://www.nabble.com/setPosition-message-format-tf2034617.html#a5619627 Sent from the java-player-users forum at Nabble.com. |
From: Radu B. R. <ru...@cs...> - 2006-08-04 08:31:03
|
Hey John, Just wanted to let you know that you were right, and that I fixed the bugs in SVN. It seems that I missed the definition change of player_positionXd_cmd_pos (velocity was added), therefore I did not upgrade the Javaclient classes. The bug was affecting all three position{1,2,3}d interface. Thanks for the head-up! Cheers, Radu. John Oliver wrote: > Hopefuly I will get around to doing this at some point. But I think it > should still exist as the Javaclient still only sends the position in the > latest svn version. However looking at the P/S cvs repo I cant see the pack > functions that exist in the tar'd distrobutions(in the libplayerxdr > directory) the functiontable.c still refers to it but I cant find > it(player_position2d_cmd_pack) anywhere to verify that it is still looking > for a velocity command. > > Anyway this may become clear once I get a chance to test it. > > thanks again > > John -- | Radu Bogdan Rusu | http://rbrusu.com/ | http://www9.cs.tum.edu/people/rusu/ | Intelligent Autonomous Systems | Technische Universitaet Muenchen |