CARLA version:0.9.14
Platform/OS:Windows 11
Problem you have experienced:There is some problem with the image displayed by rgb camera and the terminal prompts that the version is different and there is still no "/PythonAPI/carla/dist" folder after rebuilding PythonAPI.
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API
WARNING: Client API version = 0.9.14
WARNING: Simulator API version = 0.9.14-6-g43b5e7064-dirty
Below is my python code:
import carla
import numpy as np
import time
def save_image(image):
array = np.frombuffer(image.raw_data, dtype=np.dtype("uint8"))
array = np.reshape(array, (image.height, image.width, 4))
array = array[:, :, :3]
image.save_to_disk('_out/%06d.png' % image.frame)
should i rebuild carla? It would be better if there are other solutions! And I have never encountered this kind of problem on my Ubuntu system. I would be very grateful if I could get any reply.
CARLA version:0.9.14 Platform/OS:Windows 11 Problem you have experienced:There is some problem with the image displayed by rgb camera and the terminal prompts that the version is different and there is still no "/PythonAPI/carla/dist" folder after rebuilding PythonAPI.![005973](https://github.com/carla-simulator/carla/assets/74644896/28b43dcc-8cad-43c0-8e6d-c4bd406e6f2b)
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API WARNING: Client API version = 0.9.14 WARNING: Simulator API version = 0.9.14-6-g43b5e7064-dirty
Below is my python code: import carla import numpy as np import time def save_image(image): array = np.frombuffer(image.raw_data, dtype=np.dtype("uint8")) array = np.reshape(array, (image.height, image.width, 4)) array = array[:, :, :3] image.save_to_disk('_out/%06d.png' % image.frame)
client = carla.Client('localhost', 2000) client.set_timeout(10.0) world = client.get_world() blueprint_library = world.get_blueprint_library() vehicle_bp = blueprint_library.filter('vehicle.tesla.model3')[0] spawn_point = carla.Transform(carla.Location(x=0, y=0, z=2), carla.Rotation(yaw=180)) vehicle = world.spawn_actor(vehicle_bp, spawn_point) camera_bp = world.get_blueprint_library().find('sensor.camera.rgb') camera_transform = carla.Transform(carla.Location(x=1.5, z=2.4)) camera = world.spawn_actor(camera_bp, camera_transform, attach_to=vehicle)
camera.listen(lambda image: save_image(image)) time.sleep(1) vehicle.destroy()
should i rebuild carla? It would be better if there are other solutions! And I have never encountered this kind of problem on my Ubuntu system. I would be very grateful if I could get any reply.