CARLA Simulator

repository·ue5-dev·Indexed 11 days ago

https://github.com/carla-simulator/carla

An open-source simulator for the development, training, and validation of autonomous driving systems. It features high-fidelity urban environments, sensor suites, and a Python API. The simulator supports C++ client integration via LibCarla, ROS 2 native interfaces for sensor stacks, and integration with Unreal Engine 4.26 and 5.5.

Tokens
155.9K
Snippets
368
Records
620
Agent score
95%

What's inside CARLA

  1. Overview of the ROS Bridge

    ue5-dev

    The ROS bridge provides two-way communication between the CARLA simulator and the Robot Operating System (ROS). It functions by translating CARLA server information into ROS topics and converting ROS messages into commands applied within the CARLA simulation.

    Key capabilities include:

    • Sensor Data Streaming: Provides data for LIDAR, Semantic LIDAR, Cameras (depth, segmentation, RGB, DVS), GNSS, Radar, and IMU.
    • Object Data: Provides transforms, traffic light status, visualization markers, collision detection, and lane invasion data.
    • Agent Control: Allows control of Autonomous Driving (AD) agents via steering, throttle, and brake commands.
    • Simulation Control: Enables control over simulation aspects such as synchronous mode, playing/pausing the simulation, and setting simulation parameters.

    The bridge is compatible with both ROS 1 and ROS 2.

  2. Overview of Synkrotron OASIS simulation and data platforms

    ue5-dev

    Synkrotron provides advanced autonomous driving (AD) simulation solutions built on top of CARLA. The product suite, OASIS, is divided into two primary platforms:

    1. OASIS Sim (Simulation Platform): A scalable platform for the complete AD simulation lifecycle. It features a GUI for scenario import and editing, sensor configuration, distributed task management, and simulation diagnosis via logs and data. It can be deployed locally for prototyping or in the cloud at scale using containerized packaging. It also exposes APIs for DevOps integration.
    2. OASIS Data (Data Platform): A platform designed to manage high-volume data in the AD R&D pipeline. It supports data acquisition, anonymization, multi-stage filtering (using CAN bus signals, active-safety triggers, or sensor readings), environment reconstruction (LIDAR/vision), auto-labeling with perception models, and scenario tagging/reconstruction using the OpenX format.

    Processed data from OASIS Data can be used for re-simulation in OASIS Sim, retraining perception models, or fleet management.

  3. Overview of custom map creation in CARLA

    ue5-dev
    In CARLA, a map consists of two primary components: a 3D model of a town and a road network definition. The road network must follow the OpenDRIVE standard. Users can create custom maps and load them into the simulator by following a multi-step workflow involving road painting, building customization, map generation, and packaging.
  4. Integrate Inverted AI with CARLA simulations

    ue5-dev
    Inverted AI provides a simulation engine for non-playable characters (NPCs) that can be integrated with CARLA to enhance the realism of ambient traffic. It uses deep generative models to simulate complex, natural driving behaviors derived from real-world human driver data. Integration is achieved through a web-based API.
  5. Use the CARLA Python API to control the simulator

    ue5-dev

    The carla Python package is the primary interface for controlling and communicating with the CARLA simulator. It allows developers to programmatically interact with the simulation environment to:

    • Control Actors: Manipulate any actor in the simulation, including vehicles, pedestrians, and traffic lights.
    • Attach Sensors: Programmatically attach sensors (e.g., cameras, LiDAR, GNSS) to vehicles or other actors.
    • Retrieve Data: Read real-time sensor data and simulation state for autonomous driving research and testing.

    For detailed tutorials and a comprehensive walkthrough, refer to the Guide for getting started with CARLA.

  6. Explore the CARLA 3D asset catalogue

    ue5-dev

    CARLA provides a library of 3D assets to populate virtual environments for autonomous agent simulation. The catalogue includes:

    • Maps: Pre-built environments (e.g., urban or off-road).
    • Vehicles: High-fidelity models of cars, trucks, and bikes for traffic simulation.
    • Pedestrians: Various models to simulate foot traffic.
    • Props: Dynamic objects like kiosks, statues, benches, and debris that can be placed in the simulation at runtime.

    Detailed specifications for each asset type can be found in their respective catalogue files: catalogue_vehicles.md, catalogue_pedestrians.md, and catalogue_props.md.

  7. Explore CARLA components and resources

    ue5-dev

    CARLA is composed of several core modules and provides various resources for development:

    Core Components

    • Actors: Managing entities within the simulation.
    • Maps: Understanding map structures and vehicle movement.
    • Sensors and Data: Retrieving simulation data through various sensor types.
    • Traffic: Populating scenes with traffic using different simulation options.

    Developer Resources

    • Python API Reference: Detailed documentation of available Python classes and methods.
    • Catalogue: A list of available maps, vehicles, pedestrians, and props.
    • Blueprint Library: A library of blueprints used to spawn actors.
    • C++ Reference & Tutorials: For developers working with the C++ client workflow, external integration, and the recorder/replay system.
  8. Use Town 10 map in CARLA

    ue5-dev

    Town 10 is a complex urban environment designed to challenge autonomous agents. It features a mixture of inner-city environments, including skyscrapers, industrial buildings, waterfront promenades, apartment blocks, and hotels.

    Key characteristics for testing autonomous driving include:

    • Diverse Road Network: A grid layout containing various junction types such as 4-way yellow-box junctions, dedicated turning lanes, and central reservations.
    • Complex Traffic Scenarios: A variety of lane markings, crossings, and signal types.
    • Environmental Variety: Includes tree-lined boulevards with tropical vegetation, classical architecture (e.g., museums), and residential town houses/alleyways.
    ID: **Town10**
  9. Core C++ Client Workflow Tasks

    ue5-dev

    When using the C++ API, you can perform the following core operations which map to the standard CARLA workflow:

    • Connecting: Initialize and connect a carla::client::Client to the simulator.
    • World/Map Management: Query the current world and map information.
    • Actor Management: Spawn and destroy actors (vehicles, pedestrians, etc.).
    • Batch Commands: Apply batch commands to optimize multiple operations.
    • Sensors and Snapshots: Work with sensor data and world snapshots.
    • Recorder/Replay: Use recorder and replay helpers for data logging and playback.
  10. Explore advanced CARLA features

    ue5-dev

    Beyond basic actor and sensor manipulation, CARLA provides several advanced modules:

    • Traffic Manager: Manages vehicles in autopilot mode to simulate realistic urban traffic.
    • Recorder: Saves simulation snapshots for exact reenactment.
    • Co-simulation: Synchronous simulation with external tools like SUMO or PTV-Vissim.
    • OpenDRIVE Standalone Mode: Generates road meshes directly from OpenDRIVE files without requiring pre-created assets.
    • Simulation Control: Advanced management of simulation time and synchrony, as well as various rendering options (off-screen, no-rendering, or high-quality graphics).
  11. Overview of CARLA Agent scripts

    ue5-dev

    CARLA Agent scripts (found in PythonAPI/carla/agents/navigation) are divided into two functional categories:

    Planning and Control

    • controller.py: Provides the VehiclePIDController for low-level longitudinal and lateral control.
    • global_route_planner.py: Builds a graph representation of the world map to provide waypoints and road options.
    • local_planner.py: Follows waypoints using inputs from the VehiclePIDController.

    Agent Behaviors

    • basic_agent.py: Implements a BasicAgent that roams or reaches destinations while avoiding vehicles and obeying traffic lights (but ignoring stop signs).
    • behavior_agent.py: Implements a BehaviorAgent that follows traffic lights, signs, and speed limits, and can perform tailgating.
    • behavior_types.py: Defines the parameters for 'Cautious', 'Normal', and 'Aggressive' behavior profiles.
  12. What is a carla.Actor?

    ue5-dev

    In CARLA, an Actor is any entity that plays a role in the simulation or can be moved. This includes pedestrians, vehicles, sensors, and traffic signs (including traffic lights).

    Actors are spawned into the simulation by a carla.World instance and require a carla.ActorBlueprint for creation. Blueprints are selected from a library provided by CARLA.