Revision: 6440
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6440&view=rev
Author:   gerkey
Date:     2008-05-14 19:59:46 -0700 (Wed, 14 May 2008)

Log Message:
-----------
fixed major origin bug in amcl

Modified Paths:
--------------
    code/player/trunk/server/drivers/localization/amcl/amcl_laser.cc

Modified: code/player/trunk/server/drivers/localization/amcl/amcl_laser.cc
===================================================================
--- code/player/trunk/server/drivers/localization/amcl/amcl_laser.cc    
2008-05-15 02:10:16 UTC (rev 6439)
+++ code/player/trunk/server/drivers/localization/amcl/amcl_laser.cc    
2008-05-15 02:59:46 UTC (rev 6440)
@@ -176,7 +176,8 @@
   player_map_info_t* info = (player_map_info_t*)msg->GetPayload();
   
   // copy in the map info
-  this->map->origin_x = this->map->origin_y = 0.0;
+  this->map->origin_x = info->origin.px + (info->scale * info->width) / 2.0;
+  this->map->origin_y = info->origin.py + (info->scale * info->height) / 2.0;
   this->map->scale = info->scale;
   this->map->size_x = info->width;
   this->map->size_y = info->height;


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: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to