From: Marques, H. G <hg...@es...> - 2006-03-03 17:00:05
|
Hello... I just installed the javaclient2 in my computer and have a couple of = questions... 1 - First without the position interface, which interface should I use = to move the robot now? 2 - Is there a sample agent which uses javaclient2? 3 - I receive an exception when trying to request the laser interface = (data below)... Thank you in advance... Hugo CODE **********************: { ... robot =3D new PlayerClient (host,port); System.out.println (" Connecting too: "+host+" port: "+port+"..."); LaserInterface =3D robot.requestInterfaceLaser(0,'a'); System.out.println (" Laser... ok"); blobInterface =3D robot.requestInterfaceBlobfinder(0, 'a'); System.out.println (" Blob ... ok"); ... } THE OUTPUT ******************** : Player v.2.0.0 Connecting too: localhost port: 6665... errorrrrrrrr Laser... ok Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: = javaclient2.LaserInterface at = javaclient2.PlayerClient.requestInterfaceBlobfinder(PlayerClient.java:146= 1) at minimalfirstx.Agent.initRobot(Agent.java:283) at minimalfirstx.Agent.initialize(Agent.java:128) at = architecturebuilder.gui.ArchitectureBuilder.initializeWithUserObject(Arch= itectureBuilder.java:550) at = architecturebuilder.gui.ArchitectureBuilder.initialize(ArchitectureBuilde= r.java:524) at = architecturebuilder.gui.ArchitectureBuilder.access$800(ArchitectureBuilde= r.java:45) at = architecturebuilder.gui.ArchitectureBuilder$25.actionPerformed(Architectu= reBuilder.java:1504) at = javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) at = javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:21= 69) at = javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.jav= a:420) at = javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at = javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListe= ner.java:234) at java.awt.Component.processMouseEvent(Component.java:5488) at javax.swing.JComponent.processMouseEvent(JComponent.java:3126) at java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at = java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at = java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at = java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread= .java:242) at = java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.j= ava:163) at = java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at = java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) ---------------------------------------------------- Hugo Gravato Marques, University of Essex, PhD Student PHONE: +44 (0)7854917241, England or +351 962482416, Portugal ADDRESS: University of Essex, Department of Computer Science, Wivenhoe Park, Colchester Essex, CO4 3SQ, UK WEB: http://privatewww.essex.ac.uk/~hgmarq/ |