Vehicle Not Moving In CARLA Simulator

670 views Asked by At

I’m working on importing my own vehicle model into Carla, but I’m facing an issue while running the vehicle in the Carla simulator. The vehicle doesn’t seem to be moving and the wheels are moving on a different axis. I have attached the relevant images and video of the issue. Can somebody please look into the issue and help me find a fix.

YouTube link for my issue: https://youtu.be/SZVPIEiu0Bg

CARLA version: CARLA 0.9.13

Platform/OS: Ubuntu 20.04 LTS

Problem you have experienced: Vehicle not moving in the carla simulator.

What you expected to happen: The vehicle to function properly.

Steps to reproduce: Referred the CARLA documentation ( https://carla.readthedocs.io/en/latest/tuto_A_add_vehicle/ ).

1

There are 1 answers

0
yigitkucuk On

You can try the following for spawning the desired number of cars, and setting them on autopilot:

    for i in range(number_of_vehicles):
        vehicle_bp = random.choice(blueprint_library.filter('vehicle'))
        npc = world.try_spawn_actor(vehicle_bp, random.choice(spawn_points))
        if npc:
            npc.set_autopilot(True)
            print("Vehicle spawned.")
        else:
            print("Vehicle could not be spawned.")