## [Playerstage-users] Problem Roomba's Rotation

 [Playerstage-users] Problem Roomba's Rotation From: Simone Gaiera - 2011-08-12 10:08:55 Hi I had opened a new post beacause I probably find the reason of my problem with the location of robot roomba... when i'm using robot roomba my initial pose is 0,0,0 like in stage so the robot that "see" your right...the robot moves since one mether and turn left since t equals 180 degree and after the robot turn on right since the t is more than 0... testing that code i see that the robot moves whit a uncorrect degrees... can I ask you if you had tried my code to see whats the problem... thank you for your help... using namespace PlayerCc; PlayerClient roomba500("localhost", 6665); int main(int argc, char *argv[]) { const double rbump=0.180; const double rnext=0.040; const double kv=0.050; const double ko=0.040; const double kbump=dtor(3); const double speedmov=0.100; const double speedrotaz=0.050; const double speedbump=0.020; const int degree=10; const double spaziorotaz=(r+0.10); double x,y,t; double turnrate,speed; double x1,x2,y2; x1=0; x2=1.0; y2=3; roomba500.Read(); pp.ResetOdometry(); roomba500.Read(); x=pp.GetXPos(); y=pp.GetYPos(); t=pp.GetYaw(); while(yy2){ //se non riesce a compiere la rotazione break; } t=0; while(t0){ roomba500.Read(); x=pp.GetXPos(); y=pp.GetYPos(); t=pp.GetYaw(); speed=speedmov; turnrate=dtor(0); pp.SetSpeed(speed,turnrate); printf("x:%f y:%f t:%f \n",x,y,t); } if(y+spaziorotaz>y2){ //se non riesce a compiere la rotazione break; } t=3.0; while(t>kv){ roomba500.Read(); x=pp.GetXPos(); y=pp.GetYPos(); t=pp.GetYaw(); speed=speedrotaz; turnrate=dtor(-degree); pp.SetSpeed(speed,turnrate); } } } -- View this message in context: http://old.nabble.com/Problem-Roomba%27s-Rotation-tp32248663p32248663.html Sent from the playerstage-users mailing list archive at Nabble.com.