How LED lights could speed up the internet

本文探讨了光速互联网的概念,即利用快速脉冲光线无线传输信息的Li-Fi技术。介绍了一种商业化的Li-Fi版本的开发情况,并阐述了其潜在的竞争优势,与传统无线互联网进行对比。


http://news.bbc.co.uk/2/hi/programmes/click_online/9566689.stm


The internet could soon be transmitted to us at the speed of light. Visible light communication is a process that uses rapid pulses of light to transmit information wirelessly.

A commercial version of li-fi has been developed and if proved successful could soon be ready to compete with conventional wireless internet.

Harald Haas, professor of mobile communications at University of Edinburgh, explains how his team are using off-the-shelf LED lights to transmit data.




Loading pipeline components...: 100%|██████████████████████████████████████████████████████████████████████████████████| 6/6 [00:09<00:00, 1.56s/it] You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 . Token indices sequence length is longer than the specified maximum sequence length for this model (1513 > 77). Running this sequence through the model will result in indexing errors The following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: [". a sunlit sky gives a daytime feel but could be bright or maybe at night for a different vibe . adding clouds and birds in flight can enhance the futuristic feel without being too distracting . now , the city itself . neon lights are essential — like the ones on buildings , streets , and vehicles . they create that glowing effect which is common in sci - fi settings . the streetlamps should have a modern twist , maybe with neon colors changing over time to show a dynamic look . flying cars need to stand out . maybe have a variety like convertibles , sports cars , and trucks for realism . the colors could shift based on the type — like metallic blue for a sleek car and neon yellow for something flashy . adding white led lights around the wheels would make them pop . the interiors of these cars should be high - tech . glass windows with holographic digits display info while privacy screens keep passengers safe . seats made from something futuristic , maybe carbon fiber or something that looks high - end . the controls on the dashboard could have touch - sensitive panels for a smooth experience . the city 's architecture is another point . tall skyscrapers with transparent facades letting neon light through gives an otherworldly effect . skyscrapers as flying pads where people can take off into space adds a cool element , and a central hub or floating island with its own skyline would make the city feel interconnected . lighting effects are crucial . neon signs that react to movement using led technology could add some dynamism without being too bright . mirrors on buildings reflecting light like a digital canvas makes them look more alive and interactive . including technology elements , like plasma displays on walls showing info or projections onto flying cars adds depth . the city as a living organism with pulses of neon lights and moving parts gives it a life - like feel despite being man - made . in the evening , the city becomes an illuminated maze where lights dance and flicker , creating an ethereal atmosphere . at night , spaceships take off from docking stations add another dimension to the futuristic vibe . i should also consider how these elements work together . the flying cars moving through neon - lit streets with skyscrapers reflecting light creates a seamless , interconnected cityscape . the high - tech interiors enhance the futuristic theme without overwhelming the viewer . overall , this cityscape is a blend of high technology and vibrant colors that make it look both luxurious and thrilling . it 's designed to evoke an exciting environment where innovation meets entertainment . </ think > the concept of a futuristic cityscape featuring flying cars and neon lights is a classic sci - fi image that has been popularized in movies , video games , and architectural designs . here ’ s how such a cityscape might be imagined : ### 1 . ** sky as the backdrop ** - the sky would be either sunlit or at night , casting a glow on the clouds and reflecting off of birds flying overhead . - a few planes glide past in the distance , adding to the sense of air travel . ### 2 . ** the city itself ** - the city is a seamless , futuristic metropolis where architecture and technology are at their finest . - ** neon lights **: every building has neon signs that pulse and flicker in time with music or ambient sounds . the lights on the buildings could change colors , patterns , and even respond to movement ( e . g ., cars passing by ). - ** falling skies **: a thin , glowing barrier of light orbits the city at night , creating an ethereal effect . - ** sky - light **: a network of small solar - powered lamps suspended in mid - air that provide soft , diffused light to a wider area . ### 3 . ** flying cars ** - flying cars are abundant and serve as transportation throughout the city . - they come in various types : convertibles , sports cars ( with no engines but pure aerodynamics ), and cargo trucks for those who need to carry packages or people . - the exterior of these cars is covered in sleek materials that reflect the neon light . the interiors are high - tech , with glass windows displaying holographic digits while privacy screens cover sensitive information . - the tires have white led lights that glow as you ride , and the wheels spin when you brake or accelerate . ### 4 . ** car interiors ** - the seats are made of a material that seems almost liquid - like , with buttons on the dashboard that respond to touch ( e . g ., pressing them changes the car ’ s interior lights ). - the steering wheel is covered in holographic panels that show real - time data about speed , temperature , or other parameters . - seats are made from high - tech carbon fiber that can be reconfigured . ### 5 . ** the skyscraper metropolis ** - ** tall buildings **: the city ’ s skyscrapers have transparent facades that allow the neon lights to filter through and create a dazzling effect on the streets below . - ** sky - light as flying platforms **: at the top of some skyscrapers , there are platforms or landing pads where people can take off into space via flying cars . - ** central hub **: the city has a central hub or floating island that serves as a convergence point for all traffic and has its own miniature metropolis with neon - lit buildings . ### 6 . ** lighting effects ** - ** neon reactions **: neon signs react to movement , such as people walking through them ( the lights change color based on the surrounding environment ). - ** mirror reflections **: the glass exteriors of the skyscrapers reflect and refract the neon light into a kaleidoscope of patterns . - ** plasma lighting **: walls or ceilings have plasma panels that show changing colors and messages in real - time . ### 7 . ** the night city ** - at night , the city becomes an illuminated maze as lights dance and flicker in rhythm with music played by holographic performers embedded in buildings . - some areas are completely dark except for the neon lights of individual cars or buildings . ### 8 . ** higher - ledgered spaceships ** - the city is connected to outer space via a network of small , floating spaceships that orbit above ground and dock at the skyscrapers . - these spaceships have their own versions of flying cars with high - tech interiors and are constantly being serviced by shuttles from the city . ### 9 . ** interactive features ** - the neon lights on the buildings react to the presence of people , creating an interactive experience as they move through the city . - some buildings have holographic walls that project digital canvases onto them , changing with music or messages . ### 1 0 . ** the sky is the limit ** - the entire city seems to be floating on a layer of neon light , giving the impression of being part of an organism rather than a machine . - at night , the city pulses and breathes , with lights reacting to air traffic as if it were alive . this futuristic cityscape would combine high - tech elements like flying cars , advanced materials , and dynamic lighting to create a place that is both luxurious and thrilling . it would be designed to evoke excitement and wonder while also showcasing cutting - edge technology in architecture and transportation ."]
08-26
#!/usr/bin/env python # Copyright (c) 2021 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """Example script to generate traffic in the simulation""" import glob import os import sys import time try: sys.path.append(glob.glob('../carla/dist/carla-*%d.%d-%s.egg' % ( sys.version_info.major, sys.version_info.minor, 'win-amd64' if os.name == 'nt' else 'linux-x86_64'))[0]) except IndexError: pass import carla import argparse import logging from numpy import random def get_actor_blueprints(world, filter, generation): bps = world.get_blueprint_library().filter(filter) if generation.lower() == "all": return bps # If the filter returns only one bp, we assume that this one needed # and therefore, we ignore the generation if len(bps) == 1: return bps try: int_generation = int(generation) # Check if generation is in available generations if int_generation in [1, 2, 3]: bps = [x for x in bps if int(x.get_attribute('generation')) == int_generation] return bps else: print(" Warning! Actor Generation is not valid. No actor will be spawned.") return [] except: print(" Warning! Actor Generation is not valid. No actor will be spawned.") return [] def main(): argparser = argparse.ArgumentParser( description=__doc__) argparser.add_argument( '--host', metavar='H', default='127.0.0.1', help='IP of the host server (default: 127.0.0.1)') argparser.add_argument( '-p', '--port', metavar='P', default=2000, type=int, help='TCP port to listen to (default: 2000)') argparser.add_argument( '-n', '--number-of-vehicles', metavar='N', default=100, type=int, help='Number of vehicles (default: 30)') argparser.add_argument( '-w', '--number-of-walkers', metavar='W', default=0, type=int, help='Number of walkers (default: 10)') argparser.add_argument( '--safe', action='store_true', help='Avoid spawning vehicles prone to accidents') argparser.add_argument( '--filterv', metavar='PATTERN', default='vehicle.*', help='Filter vehicle model (default: "vehicle.*")') argparser.add_argument( '--generationv', metavar='G', default='All', help='restrict to certain vehicle generation (values: "1","2","All" - default: "All")') argparser.add_argument( '--filterw', metavar='PATTERN', default='walker.pedestrian.*', help='Filter pedestrian type (default: "walker.pedestrian.*")') argparser.add_argument( '--generationw', metavar='G', default='2', help='restrict to certain pedestrian generation (values: "1","2","All" - default: "2")') argparser.add_argument( '--tm-port', metavar='P', default=8000, type=int, help='Port to communicate with TM (default: 8000)') argparser.add_argument( '--asynch', action='store_true', help='Activate asynchronous mode execution') argparser.add_argument( '--hybrid', action='store_true', help='Activate hybrid mode for Traffic Manager') argparser.add_argument( '-s', '--seed', metavar='S', type=int, help='Set random device seed and deterministic mode for Traffic Manager') argparser.add_argument( '--seedw', metavar='S', default=0, type=int, help='Set the seed for pedestrians module') argparser.add_argument( '--car-lights-on', action='store_true', default=False, help='Enable automatic car light management') argparser.add_argument( '--hero', action='store_true', default=False, help='Set one of the vehicles as hero') argparser.add_argument( '--respawn', action='store_true', default=False, help='Automatically respawn dormant vehicles (only in large maps)') argparser.add_argument( '--no-rendering', action='store_true', default=False, help='Activate no rendering mode') args = argparser.parse_args() logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) vehicles_list = [] walkers_list = [] all_id = [] client = carla.Client(args.host, args.port) client.set_timeout(10.0) synchronous_master = False random.seed(args.seed if args.seed is not None else int(time.time())) try: world = client.get_world() traffic_manager = client.get_trafficmanager(args.tm_port) traffic_manager.set_global_distance_to_leading_vehicle(2.5) if args.respawn: traffic_manager.set_respawn_dormant_vehicles(True) if args.hybrid: traffic_manager.set_hybrid_physics_mode(True) traffic_manager.set_hybrid_physics_radius(70.0) if args.seed is not None: traffic_manager.set_random_device_seed(args.seed) settings = world.get_settings() if not args.asynch: traffic_manager.set_synchronous_mode(True) if not settings.synchronous_mode: synchronous_master = True settings.synchronous_mode = True settings.fixed_delta_seconds = 0.05 else: synchronous_master = False else: print("You are currently in asynchronous mode. If this is a traffic simulation, \ you could experience some issues. If it's not working correctly, switch to synchronous \ mode by using traffic_manager.set_synchronous_mode(True)") if args.no_rendering: settings.no_rendering_mode = True world.apply_settings(settings) blueprints = get_actor_blueprints(world, args.filterv, args.generationv) if not blueprints: raise ValueError("Couldn't find any vehicles with the specified filters") blueprintsWalkers = get_actor_blueprints(world, args.filterw, args.generationw) if not blueprintsWalkers: raise ValueError("Couldn't find any walkers with the specified filters") if args.safe: blueprints = [x for x in blueprints if x.get_attribute('base_type') == 'car'] blueprints = sorted(blueprints, key=lambda bp: bp.id) spawn_points = world.get_map().get_spawn_points() number_of_spawn_points = len(spawn_points) if args.number_of_vehicles < number_of_spawn_points: random.shuffle(spawn_points) elif args.number_of_vehicles > number_of_spawn_points: msg = 'requested %d vehicles, but could only find %d spawn points' logging.warning(msg, args.number_of_vehicles, number_of_spawn_points) args.number_of_vehicles = number_of_spawn_points # @todo cannot import these directly. SpawnActor = carla.command.SpawnActor SetAutopilot = carla.command.SetAutopilot FutureActor = carla.command.FutureActor # -------------- # Spawn vehicles # -------------- batch = [] hero = args.hero for n, transform in enumerate(spawn_points): if n >= args.number_of_vehicles: break blueprint = random.choice(blueprints) if blueprint.has_attribute('color'): color = random.choice(blueprint.get_attribute('color').recommended_values) blueprint.set_attribute('color', color) if blueprint.has_attribute('driver_id'): driver_id = random.choice(blueprint.get_attribute('driver_id').recommended_values) blueprint.set_attribute('driver_id', driver_id) if hero: blueprint.set_attribute('role_name', 'hero') hero = False else: blueprint.set_attribute('role_name', 'autopilot') # spawn the cars and set their autopilot and light state all together batch.append(SpawnActor(blueprint, transform) .then(SetAutopilot(FutureActor, True, traffic_manager.get_port()))) for response in client.apply_batch_sync(batch, synchronous_master): if response.error: logging.error(response.error) else: vehicles_list.append(response.actor_id) # Set automatic vehicle lights update if specified if args.car_lights_on: all_vehicle_actors = world.get_actors(vehicles_list) for actor in all_vehicle_actors: traffic_manager.update_vehicle_lights(actor, True) # ------------- # Spawn Walkers # ------------- # some settings percentagePedestriansRunning = 0.0 # how many pedestrians will run percentagePedestriansCrossing = 0.0 # how many pedestrians will walk through the road if args.seedw: world.set_pedestrians_seed(args.seedw) random.seed(args.seedw) # 1. take all the random locations to spawn spawn_points = [] for i in range(args.number_of_walkers): spawn_point = carla.Transform() loc = world.get_random_location_from_navigation() if (loc != None): spawn_point.location = loc spawn_points.append(spawn_point) # 2. we spawn the walker object batch = [] walker_speed = [] for spawn_point in spawn_points: walker_bp = random.choice(blueprintsWalkers) # set as not invincible probability = random.randint(0,100 + 1); if walker_bp.has_attribute('is_invincible'): walker_bp.set_attribute('is_invincible', 'false') if walker_bp.has_attribute('can_use_wheelchair') and probability < 11: walker_bp.set_attribute('use_wheelchair', 'true') # set the max speed if walker_bp.has_attribute('speed'): if (random.random() > percentagePedestriansRunning): # walking walker_speed.append(walker_bp.get_attribute('speed').recommended_values[1]) else: # running walker_speed.append(walker_bp.get_attribute('speed').recommended_values[2]) else: print("Walker has no speed") walker_speed.append(0.0) batch.append(SpawnActor(walker_bp, spawn_point)) results = client.apply_batch_sync(batch, True) walker_speed2 = [] for i in range(len(results)): if results[i].error: logging.error(results[i].error) else: walkers_list.append({"id": results[i].actor_id}) walker_speed2.append(walker_speed[i]) walker_speed = walker_speed2 # 3. we spawn the walker controller batch = [] walker_controller_bp = world.get_blueprint_library().find('controller.ai.walker') for i in range(len(walkers_list)): batch.append(SpawnActor(walker_controller_bp, carla.Transform(), walkers_list[i]["id"])) results = client.apply_batch_sync(batch, True) for i in range(len(results)): if results[i].error: logging.error(results[i].error) else: walkers_list[i]["con"] = results[i].actor_id # 4. we put together the walkers and controllers id to get the objects from their id for i in range(len(walkers_list)): all_id.append(walkers_list[i]["con"]) all_id.append(walkers_list[i]["id"]) all_actors = world.get_actors(all_id) # wait for a tick to ensure client receives the last transform of the walkers we have just created if args.asynch or not synchronous_master: world.wait_for_tick() else: world.tick() # 5. initialize each controller and set target to walk to (list is [controler, actor, controller, actor ...]) # set how many pedestrians can cross the road world.set_pedestrians_cross_factor(percentagePedestriansCrossing) for i in range(0, len(all_id), 2): # start walker all_actors[i].start() # set walk to random point all_actors[i].go_to_location(world.get_random_location_from_navigation()) # max speed all_actors[i].set_max_speed(float(walker_speed[int(i/2)])) print('spawned %d vehicles and %d walkers, press Ctrl+C to exit.' % (len(vehicles_list), len(walkers_list))) # Example of how to use Traffic Manager parameters traffic_manager.global_percentage_speed_difference(30.0) while True: if not args.asynch and synchronous_master: world.tick() else: world.wait_for_tick() finally: if not args.asynch and synchronous_master: settings = world.get_settings() settings.synchronous_mode = False settings.no_rendering_mode = False settings.fixed_delta_seconds = None world.apply_settings(settings) print('\ndestroying %d vehicles' % len(vehicles_list)) client.apply_batch([carla.command.DestroyActor(x) for x in vehicles_list]) # stop walker controllers (list is [controller, actor, controller, actor ...]) for i in range(0, len(all_id), 2): all_actors[i].stop() print('\ndestroying %d walkers' % len(walkers_list)) client.apply_batch([carla.command.DestroyActor(x) for x in all_id]) time.sleep(0.5) if __name__ == '__main__': try: main() except KeyboardInterrupt: pass finally: print('\ndone.')
06-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值