We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def main(): client = carla.Client('localhost', 2000) client.set_timeout(2.0) world = client.get_world() spectator = world.get_spectator()
# 获取特定车辆的蓝图(Audi e-tron) specific_vehicle_blueprint = world.get_blueprint_library().find('vehicle.audi.etron') # 设置车辆颜色为白色 (R, G, B) specific_vehicle_blueprint.set_attribute('color', '255, 255, 255') # 白色 print(f"Set color to: {specific_vehicle_blueprint.get_attribute('color')}") # >>Set color to: ActorAttribute(id=color,type=Color,value=Color(255,255,255,255)) # 随机选择一个车辆的初始位置 location = random.choice(world.get_map().get_spawn_points()).location # 使用特定车辆蓝图生成车辆 transform = carla.Transform(location) vehicle = world.spawn_actor(specific_vehicle_blueprint, transform)
The text was updated successfully, but these errors were encountered:
This may be because the material slot is not named "Bodywork_Mat", see #7611
Sorry, something went wrong.
No branches or pull requests
def main():
client = carla.Client('localhost', 2000)
client.set_timeout(2.0)
world = client.get_world()
spectator = world.get_spectator()
The text was updated successfully, but these errors were encountered: