From: Maria S. <mar...@go...> - 2008-04-22 12:38:40
|
Hi, I think I've read similar questions on the list but no answers to them so I try again: I understood that P/S 2.1 and Javaclient are to some extend but not fully compatible, right!? So with these software versions I simply try to control a pan-tilt-unit. My problem is that I can read from the ptz once, then move it to a desired position and then I can never read from it again, it loops forever... surely this can't be a version problem!? Here's the (very simple) code: / // read actual position data System.out.println(robot.readAll()); while (!head.isDataReady()) { robot.readAll(); } PlayerPtzData data = head.getData(); float acttilt = data.getTilt(); float actpan = data.getPan(); System.out.println("actual pos ["+actpan+","+acttilt+"]"); System.out.println("moving to ["+pangoal+","+tiltgoal+"]"); // create a data structure that contains new position data and pass to ptz-interface PlayerPtzCmd direction = new PlayerPtzCmd(); direction.setPan(pangoal); direction.setTilt(tiltgoal); head.setPTZ(direction); // now read new/actual position data System.out.println(robot.readAll()); while (!head.isDataReady()) { robot.readAll(); } PlayerPtzData nextData = head.getData(); actpan = nextData.getPan(); acttilt = nextData.getTilt(); System.out.println("final pos ["+actpan+","+acttilt+"]"); / If anyone can help me here, that would be great. Thanks, Maria |
From: Leo N. <leo...@gm...> - 2008-04-23 09:29:18
|
As you allready know, P/S2.1 and the actual Javaclient are not compatible at all. The messages sent by the PS server have been modified since 2.0.5 so the javaclient proxies are trying to decode diferent size messages. This leads to strange behaviours, basically due to the fact that javaclient is unable to decode those messages. I guess you can read and send the first command but no more because somehow those messages have not been changed, or at least not too much, but this is a lotery ... We will release a new version ASAP, but unfortunately right now we simply have no more than 24 hours a day. We are trying to get 36h/day days but days are not cooperating ... ;) Bests Leo 2008/4/22, Maria Staudte <mar...@go...>: > > Hi, > > I think I've read similar questions on the list but no answers to them > so I try again: > > I understood that P/S 2.1 and Javaclient are to some extend but not > fully compatible, right!? > So with these software versions I simply try to control a pan-tilt-unit. > My problem is that I can read from the ptz once, then move it to a > desired position and then I can never read from it again, it loops > forever... surely this can't be a version problem!? > > Here's the (very simple) code: > > > / // read actual position data > System.out.println(robot.readAll()); > > while (!head.isDataReady()) { > robot.readAll(); > } > > PlayerPtzData data = head.getData(); > > float acttilt = data.getTilt(); > float actpan = data.getPan(); > > System.out.println("actual pos ["+actpan+","+acttilt+"]"); > System.out.println("moving to ["+pangoal+","+tiltgoal+"]"); > > // create a data structure that contains new position data and > pass to ptz-interface > PlayerPtzCmd direction = new PlayerPtzCmd(); > > direction.setPan(pangoal); > direction.setTilt(tiltgoal); > > head.setPTZ(direction); > > // now read new/actual position data > System.out.println(robot.readAll()); > > while (!head.isDataReady()) { > robot.readAll(); > } > > PlayerPtzData nextData = head.getData(); > actpan = nextData.getPan(); > acttilt = nextData.getTilt(); > System.out.println("final pos ["+actpan+","+acttilt+"]"); > / > > > If anyone can help me here, that would be great. > > Thanks, > Maria > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Java-player-users mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-player-users > -- ************************************** Leonardo Nomdedeu Calvente leo...@gm... |
From: Maria S. <mar...@go...> - 2008-04-25 07:51:19
|
Hi Leo, many thanks for your reply! Before I got your message I somehow managed to control the PTZ and bascially set it to any position I want, though it still is impossible to read from it. Well, for my purposes that was sufficient... though of course it is not satisfactory state at all. I'm sure you guys work very hard on the new version, so many thanks for that in advance! I just thought I'd let you know what effects I noticed so far... cheers, maria Leo Nomdedeu schrieb: > As you allready know, P/S2.1 and the actual Javaclient are not compatible at > all. The messages sent by the PS server have been modified since 2.0.5 so > the javaclient proxies are trying to decode diferent size messages. This > leads to strange behaviours, basically due to the fact that javaclient is > unable to decode those messages. > > I guess you can read and send the first command but no more because somehow > those messages have not been changed, or at least not too much, but this is > a lotery ... > > We will release a new version ASAP, but unfortunately right now we simply > have no more than 24 hours a day. We are trying to get 36h/day days but days > are not cooperating ... ;) > > Bests > Leo > > 2008/4/22, Maria Staudte <mar...@go...>: > >> Hi, >> >> I think I've read similar questions on the list but no answers to them >> so I try again: >> >> I understood that P/S 2.1 and Javaclient are to some extend but not >> fully compatible, right!? >> So with these software versions I simply try to control a pan-tilt-unit. >> My problem is that I can read from the ptz once, then move it to a >> desired position and then I can never read from it again, it loops >> forever... surely this can't be a version problem!? >> >> Here's the (very simple) code: >> >> >> / // read actual position data >> System.out.println(robot.readAll()); >> >> while (!head.isDataReady()) { >> robot.readAll(); >> } >> >> PlayerPtzData data = head.getData(); >> >> float acttilt = data.getTilt(); >> float actpan = data.getPan(); >> >> System.out.println("actual pos ["+actpan+","+acttilt+"]"); >> System.out.println("moving to ["+pangoal+","+tiltgoal+"]"); >> >> // create a data structure that contains new position data and >> pass to ptz-interface >> PlayerPtzCmd direction = new PlayerPtzCmd(); >> >> direction.setPan(pangoal); >> direction.setTilt(tiltgoal); >> >> head.setPTZ(direction); >> >> // now read new/actual position data >> System.out.println(robot.readAll()); >> >> while (!head.isDataReady()) { >> robot.readAll(); >> } >> >> PlayerPtzData nextData = head.getData(); >> actpan = nextData.getPan(); >> acttilt = nextData.getTilt(); >> System.out.println("final pos ["+actpan+","+acttilt+"]"); >> / >> >> >> If anyone can help me here, that would be great. >> >> Thanks, >> Maria >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save $100. >> Use priority code J8TL2D2. >> >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> _______________________________________________ >> Java-player-users mailing list >> Jav...@li... >> https://lists.sourceforge.net/lists/listinfo/java-player-users >> >> > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > ------------------------------------------------------------------------ > > _______________________________________________ > Java-player-users mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-player-users > |