load-map

Loads, reloads, and reshapes maps on a running CARLA server via the Python API.

3|Updated Jul 20, 2026
One-click install
npx skills add https://github.com/carla-simulator/carla-agentic-tools --skill load-map-carla-simulator
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: load-map
Source: https://github.com/carla-simulator/carla-agentic-tools/tree/main/skills/python-api/load-map
Command: npx skills add https://github.com/carla-simulator/carla-agentic-tools --skill load-map-carla-simulator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires carla, and includes scripts (resource) and references (resource) components.

What problem does it solve? Changing the map on a running CARLA server is error-prone: a load can silently land on the wrong map, reset synchronous-mode settings mid-pipeline, or leave layer toggles as no-ops. This Skill performs map operations through the CARLA Python API and verifies the resulting world state after every change. ## Core Features & Use Cases - Map loading and reloading: List available maps, load a named town, or reload the current world, with a --keep flag that preserves synchronous mode, fixed delta, and rendering settings across the switch. - OpenDRIVE and OSM world generation: Build a drivable world from a .xodr road network or an OpenStreetMap export using generate_opendrive_world with configurable generation parameters. - Map layer control: Load and unload MapLayer sets (Buildings, Foliage, Ground, etc.) on layered _Opt maps, with warnings for the UE5 line where layer ops are silent no-ops. - Use Case: You are recording sensor data in synchronous mode at 20 fps and need to switch from Town03 to Town02 without breaking the pipeline — run the load command with --keep and confirm the VERIFY block still shows synchronous_mode = True. ## Quick Start Ask the agent to load Town03 on the running CARLA server while keeping the current world settings, then confirm the printed VERIFY block shows the expected map name and settings.

Frequently Asked Questions about load-map

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load a map in CARLA using the Python API?▼

Call client.load_world with the map name, such as load_world("Town03"), after connecting a carla.Client to the server. The load_map.py script wraps this with friendly name resolution, so bare names like Town2 or Town10 resolve to the map actually used.

How do I change the CARLA map without losing synchronous mode settings?▼

Pass reset_settings=False to load_world or reload_world, exposed here as the --keep flag. The default reset_settings=True drops the new world back to asynchronous default rendering, which breaks sync-mode data pipelines.

Can I generate a CARLA world from an OpenDRIVE or OpenStreetMap file?▼

Yes. generate_opendrive_world builds a drivable road-only world from .xodr file contents with configurable OpendriveGenerationParameters. OpenStreetMap .osm files are converted first via carla.Osm2Odr.convert, then fed to the same call.

Why do CARLA map layer load and unload calls do nothing?▼

Layer toggles only work on layered maps: the _Opt variants and large maps like Town11 and Town12. On fully-baked maps the calls are silently ignored, and on the UE5 line (0.10.x) they are no-ops on every map because layers were flattened into the persistent level.

What happens to actors and ROS 2 topics after a CARLA map switch?▼

All actors are destroyed on load_world or reload_world and must be re-spawned. On a ROS 2 server the rt/carla/map topic re-publishes automatically, but old sensor topics linger as zombie publishers, so re-spawning with the same ros_name accumulates duplicate publishers.