From: Brian G. <ge...@us...> - 2007-01-19 14:34:13
|
Update of /cvsroot/playerstage/code/player/server/drivers/localization/amcl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1684/drivers/localization/amcl Modified Files: amcl.cc amcl.h Log Message: fixed position update bug in amcl Index: amcl.cc =================================================================== RCS file: /cvsroot/playerstage/code/player/server/drivers/localization/amcl/amcl.cc,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** amcl.cc 7 Jun 2006 16:20:02 -0000 1.75 --- amcl.cc 19 Jan 2007 22:34:09 -0000 1.76 *************** *** 883,887 **** usleep(1000); ProcessMessages(); ! UpdateSensorData(); continue; } --- 883,887 ---- usleep(1000); ProcessMessages(); ! //UpdateSensorData(); continue; } *************** *** 952,956 **** // Encode data to send to server this->PutDataLocalize(ts); ! this->PutDataPosition(delta); return true; --- 952,957 ---- // Encode data to send to server this->PutDataLocalize(ts); ! delta = pf_vector_zero(); ! this->PutDataPosition(delta,ts); return true; *************** *** 973,977 **** // Encode data to send to server; only the position interface // gets updated every cycle ! this->PutDataPosition(delta); return false; --- 974,978 ---- // Encode data to send to server; only the position interface // gets updated every cycle ! this->PutDataPosition(delta,ts); return false; *************** *** 1056,1060 **** PLAYER_MSGTYPE_DATA, PLAYER_LOCALIZE_DATA_HYPOTHS, ! (void*)&data,datalen,NULL); } --- 1057,1061 ---- PLAYER_MSGTYPE_DATA, PLAYER_LOCALIZE_DATA_HYPOTHS, ! (void*)&data,datalen,&time); } *************** *** 1062,1066 **** //////////////////////////////////////////////////////////////////////////////// // Output data on the position interface ! void AdaptiveMCL::PutDataPosition(pf_vector_t delta) { pf_vector_t pose; --- 1063,1067 ---- //////////////////////////////////////////////////////////////////////////////// // Output data on the position interface ! void AdaptiveMCL::PutDataPosition(pf_vector_t delta, double time) { pf_vector_t pose; *************** *** 1085,1089 **** PLAYER_MSGTYPE_DATA, PLAYER_POSITION2D_DATA_STATE, ! (void*)&data,sizeof(data),NULL); } --- 1086,1090 ---- PLAYER_MSGTYPE_DATA, PLAYER_POSITION2D_DATA_STATE, ! (void*)&data,sizeof(data),&time); } Index: amcl.h =================================================================== RCS file: /cvsroot/playerstage/code/player/server/drivers/localization/amcl/amcl.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** amcl.h 7 Jun 2006 16:20:02 -0000 1.15 --- amcl.h 19 Jan 2007 22:34:09 -0000 1.16 *************** *** 126,130 **** // Put new position data ! private: void PutDataPosition(pf_vector_t delta); // Send back geometry data --- 126,130 ---- // Put new position data ! private: void PutDataPosition(pf_vector_t delta, double time); // Send back geometry data |