def __init__(self, width, control_points, *args, **kwargs): PlacedObject.__init__(self, *args, **kwargs) self.width = width self.control_points = control_points for p in control_points: check_isinstance(p, SE2Transform)
def __init__(self, width, length, height, *args, color: str = None, **kwargs): # noinspection PyArgumentList PlacedObject.__init__(self, *args, **kwargs) self.width = width self.height = height self.length = length self.color = color or "red"
def __init__(self, width, length, height, *args, color: str = None, **kwargs): PlacedObject.__init__(self, *args, **kwargs) self.width = width self.height = height self.length = length self.color = color or "red"
def __init__(self, kind, drivable, **kwargs): PlacedObject.__init__(self, **kwargs) self.kind = kind self.drivable = drivable from duckietown_world.world_duckietown.map_loading import get_texture_file try: self.fn = get_texture_file(kind) except KeyError: msg = 'Cannot find texture for %s' % kind logger.warning(msg) self.fn = None
def __init__(self, kind, drivable, **kwargs): # noinspection PyArgumentList PlacedObject.__init__(self, **kwargs) self.kind = kind self.drivable = drivable self.fn_emissive = get_if_exists(self.style, kind, "emissive") self.fn_normal = get_if_exists(self.style, kind, "normals") self.fn = get_if_exists(self.style, kind, "texture") self.fn_metallic_roughness = get_if_exists(self.style, kind, "metallic_roughness") self.fn_occlusion = get_if_exists(self.style, kind, "occlusion") if not "slots" in self.children: slots = get_tile_slots() # noinspection PyTypeChecker self.set_object("slots", slots, ground_truth=SE2Transform.identity())
def __init__(self, width, control_points, *args, **kwargs): PlacedObject.__init__(self, *args, **kwargs) self.width = float(width) self.control_points = control_points for p in control_points: check_isinstance(p, SE2Transform) for i in range(len(control_points) - 1): a = control_points[i] b = control_points[i + 1] ta, _ = geo.translation_angle_from_SE2(a.as_SE2()) tb, _ = geo.translation_angle_from_SE2(b.as_SE2()) d = np.linalg.norm(ta - tb) if d < 0.001: msg = 'Two points are two close: \n%s\n%s' % (a, b) raise ValueError(msg)
def __init__(self, kind, drivable, **kwargs): # noinspection PyArgumentList PlacedObject.__init__(self, **kwargs) self.kind = kind self.drivable = drivable from duckietown_world.world_duckietown.map_loading import get_texture_file try: self.fn = get_texture_file(kind) except KeyError as e: msg = f"Cannot find texture for tile of type {kind}" logger.warning(msg, e=e) self.fn = None # if kind in ['asphalt']: if not "slots" in self.children: slots = get_tile_slots() self.set_object("slots", slots, ground_truth=SE2Transform.identity())
def __init__(self, kind, drivable, **kwargs): PlacedObject.__init__(self, **kwargs) self.kind = kind self.drivable = drivable from duckietown_world.world_duckietown.map_loading import get_texture_file try: self.fn = get_texture_file(kind) except KeyError: msg = 'Cannot find texture for %s' % kind logger.warning(msg) self.fn = None # if kind in ['asphalt']: if not 'slots' in self.children: slots = get_tile_slots() self.set_object('slots', slots, ground_truth=SE2Transform.identity())
def __init__(self, status=None, **kwargs): if status is None: status = Constant("off") PlacedObject.__init__(self, **kwargs) self.status = status
def __init__(self, status, **kwargs): PlacedObject.__init__(self, **kwargs) self.status = status
def __init__(self, tile_size, *args, **kwargs): self.tile_size = tile_size PlacedObject.__init__(self, *args, **kwargs)
def __init__(self, status=None, **kwargs): # if status is None: # status = Constant[TrafficLightStatus]("off") # noinspection PyArgumentList PlacedObject.__init__(self, **kwargs) self.status = status
def __init__(self, status=None, **kwargs): # if status is None: # status = Constant[TrafficLightStatus]("off") PlacedObject.__init__(self, **kwargs) self.status = status
def __init__(self, width, length, height, *args, **kwargs): PlacedObject.__init__(self, *args, **kwargs) self.width = width self.height = height self.length = length
def __init__(self, tile_size: float, *args, **kwargs): self.tile_size = tile_size # noinspection PyArgumentList PlacedObject.__init__(self, *args, **kwargs)