carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
10.66k stars 3.42k forks source link

Cannot Change Motorcycle/Bicycle Driver #7612

Closed GoodarzMehr closed 2 weeks ago

GoodarzMehr commented 3 weeks ago

CARLA version: 0.9.15 Platform/OS: Ubuntu 22.04 Problem you have experienced: I am using the following piece of code to change the driver of motorcycles/bicycles:

if v_blueprint.has_attribute('driver_id'):
    v_blueprint.set_attribute(
        'driver_id',
        random.choice(v_blueprint.get_attribute('driver_id').recommended_values)
    )

However, I have noticed that in practice nothing changes and each motorcycle/bicycle is spawned with the same driver. Could you please confirm if this is the case or if I am doing something wrong?

DnDare commented 3 weeks ago

Hi, making changes to 'driver_id', won't change the rider. You should change the rider at Unreal's project, you'll have to download it I don't think you can change riders at the package.

Blyron commented 3 weeks ago

Yeah. We haven't implemented that yet. We will need to do that in Editor. For now at least

00bix commented 3 weeks ago

Out of curiosity: When is spawn this bike: https://carla.readthedocs.io/en/0.9.15/catalogue_vehicles/#diamondback-century I get this rider : Screenshot from 2024-05-10 13-44-51

... How come the vehicles in the catalgoue are not the vehicles i can spawn? Am I missing something?

DnDare commented 3 weeks ago

It's the same vehicle, but we updated the rider.

GoodarzMehr commented 3 weeks ago

Thanks! I saw it in multiple example scripts so I was under the impression that it would change the rider.

I'll leave this issue open for now. Please let me know if/when it gets implemented, since it would help diversify scenarios a tiny bit more.