From: Marques, H. G <hg...@es...> - 2006-03-04 18:17:53
|
Hello...=20 thanks for the reply... I've double checked my code and there is no = refences (not even in the classpath) to javaclient1.6.5. I already = manage to control the robot's movement but the method setSpeed(int,int) = is in my code of javaclient2: public void setSpeed (int speed, int turnrate) { PlayerPose pp =3D new PlayerPose (); pp.setPx (speed); pp.setPa (turnrate); setVelocity (pp, 1); } I agree with you that it should not be there has it looks compliant with = the previous version but in fact the speed and turnrate are different = now... I also tried to investigate a bit further the ClassCastException and I = believe that the mistake is on the player (or stage) side. It seems to = me that there are variables not properly instantiated and that is = somteimes it works and sometimes don't... the PlayerClient code looks = fine to me...=20 actually the error only happens when I receive only this message from = stage: Player v.2.0.0 Rather than: Player v.2.0.0 selected devices [localhost:6666]: 6666:position2d:0 (stage) 6666:sonar:0 (stage) 6666:laser:0 (stage) 6666:blobfinder:0 (stage) 6666:fiducial:0 (stage) I hope this helps... once again thanks... Hugo ---------------------------------------------------- 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/ =20 -----Original Message----- From: jav...@li... on behalf of Radu = Bogdan Rusu Sent: Sat 04/03/2006 09:30 To: jav...@li... Subject: Re: [Java-player-users] InterfacePosition2D =20 Hi Hugo, Marques, Hugo G wrote: >Hi... > =20 > I just woke up, so I didn't have a chance to look at the problem yet=20 (will do soon), but... >Apart from this error I was wondering how can I make the robot move = smoother and slower since even with setSpeed(1,1) it drives too fast... = At the moment I can't actually control the direction of the movement... = How can I solve this? > =20 > This is not good... setSpeed was removed in Javaclient2 completely!=20 Instead we have setVelocity (PlayerPose,int). PlayerPose has float=20 structures so no need to send integers. Are you using a mix between=20 Javaclient 1.6.5 and Javaclient2 ? >Cheers, >Hugo > =20 > Cheers back :) Radu. --=20 | Radu Bogdan Rusu | http://rbrusu.com/ | http://www9.cs.tum.edu/people/rusu/ | Intelligent Autonomous Systems | Technische Universitaet Muenchen |