Esempio n. 1
0
    def __init__(self, laser, map_size_pixels, map_size_meters, 
                map_quality=_DEFAULT_MAP_QUALITY, hole_width_mm=_DEFAULT_HOLE_WIDTH_MM):

        CoreSLAM.__init__(self, laser, map_size_pixels, map_size_meters, 
            map_quality, hole_width_mm)                    
                    
        # Initialize the position (x, y, theta)
        init_coord_mm = 500 * map_size_meters # center of map
        self.position =  pybreezyslam.Position(init_coord_mm, init_coord_mm, 0)
 def build(self,
           laserModel,
           map_size_pix,
           map_size_m,
           initial_position=(-1, -1)):
     slam = RMHC_SLAM(LaserModel(), self.MAP_SIZE_PIXELS,
                      self.MAP_SIZE_METERS)
     if not initial_position == (-1, -1):
         slam.position = pybreezyslam.Position(initial_position[0] * 10,
                                               initial_position[0] * 10, 0)
     return slam