Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
description='Tour through the west coast gathering '
'Lidar data')
vehicle = Vehicle('ego_vehicle', model='etk800', licence='LIDAR')
lidar = Lidar()
vehicle.attach_sensor('lidar', lidar)
scenario.add_vehicle(vehicle, pos=(-717.121, 101, 118.675), rot=(0, 0, 45))
scenario.make(beamng)
bng = beamng.open(launch=True)
try:
bng.load_scenario(scenario)
window = open_window(SIZE, SIZE)
lidar_vis = LidarVisualiser(Lidar.max_points)
lidar_vis.open(SIZE, SIZE)
bng.set_steps_per_second(60)
bng.set_deterministic()
bng.hide_hud()
bng.start_scenario()
bng.pause()
vehicle.ai_set_mode('span')
def update():
sensors = bng.poll_sensors(vehicle)
points = sensors['lidar']['points']
bng.step(3, wait=False)