def __init__(self, slam, mapconfig, ROBOT_SIZE_METERS, offset_in_scan, min_distance, commands): """ MAP_SIXE_PIXELS: map size in pixel MAP_SIZE_METERS: map size in meters ROBOT_SZIE_METERS: robot size in meters offset_in_scan: values to check in a scan for obstacles from the center min_distance: minimum distance to keep to obstacles commans: costants for commands """ self.commands = commands threading.Thread.__init__(self) self.slam = slam self.mapconfig = mapconfig self.ROBOT_SIZE_METERS = ROBOT_SIZE_METERS self.mapbytes = self.createMap() self.recalculate = False self.offset_in_scan = offset_in_scan self.min_distance = min_distance self.router = TentacleRouter(mapconfig, ROBOT_SIZE_METERS, min_distance)