Revision: 7125 http://playerstage.svn.sourceforge.net/playerstage/?rev=7125&view=rev Author: gerkey Date: 2008-11-04 08:46:50 +0000 (Tue, 04 Nov 2008)
Log Message: ----------- Removed busy loop at startup of amcl Modified Paths: -------------- code/player/trunk/server/drivers/localization/amcl/amcl.cc code/player/trunk/server/drivers/localization/amcl/amcl.h Modified: code/player/trunk/server/drivers/localization/amcl/amcl.cc =================================================================== --- code/player/trunk/server/drivers/localization/amcl/amcl.cc 2008-11-01 01:02:17 UTC (rev 7124) +++ code/player/trunk/server/drivers/localization/amcl/amcl.cc 2008-11-04 08:46:50 UTC (rev 7125) @@ -663,6 +663,8 @@ // filter has not yet been initialized this->pf_init = false; + this->pf_init_internal = false; + // Initial hypothesis list this->hyp_count = 0; @@ -711,8 +713,11 @@ #endif // Initialize the filter if we havent already done so - if (!this->pf_init) + if (!this->pf_init && !this->pf_init_internal) + { this->InitFilter(); + this->pf_init_internal = true; + } // Update the filter if (this->UpdateFilter()) @@ -1128,6 +1133,7 @@ this->pf_init_pose_mean = pose; this->pf_init_pose_cov = cov; this->pf_init = false; + this->pf_init_internal = false; // Send an ACK this->Publish(this->localize_addr, resp_queue, Modified: code/player/trunk/server/drivers/localization/amcl/amcl.h =================================================================== --- code/player/trunk/server/drivers/localization/amcl/amcl.h 2008-11-01 01:02:17 UTC (rev 7124) +++ code/player/trunk/server/drivers/localization/amcl/amcl.h 2008-11-04 08:46:50 UTC (rev 7125) @@ -181,6 +181,7 @@ // Has the filter been initialized? private: bool pf_init; + private: bool pf_init_internal; // Initial pose estimate; used for filter initialization private: pf_vector_t pf_init_pose_mean; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit