Skip to content
Skillpedia
Analysis & spreadsheets15k Β· #11106

world-data

What it does

This skill searches a running CARLA simulation for the object you describe, such as a red car or the closest pedestrian, and reports its ID. It is for people who want to point other tools at the right object.

When to use it

  • βœ“When you describe a car or person and need its ID number to use in another step.
  • βœ“When you want the closest object to a point or to another object in the simulation.
  • βœ“When you need a snapshot of everything currently in the simulated world.

Skill link

https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/world-data/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/world-data/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCan you find the red car nearest my test car in the CARLA simulation and give me its ID?”

5 new skills a week. 1 minute to read.

How it works

The agent filters the objects in the simulation by type, role, colour or distance, and keeps narrowing until only one is left. It then reports that object's ID.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Query the world (and resolve entities)

Paths. scripts/… and references/… below are relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.

The resolver skill. Other skills act on one entity by id; this one finds that id when the request is a description β€” "a prius" (but there are three), "the nearest walker", "the 3rd vehicle". It also reads world-level data: snapshot, level bounding boxes, raycasts, ground projection.

Identifying a specific actor (the core use)

There is no ordering / rank β€” peer actors have no meaningful order, so "the 3rd one" is not a thing. Identify by a stable attribute or a spatial predicate, narrowing until one remains, then use its id:

  • by type/blueprint: --filter '*prius*', --filter walker.pedestrian.*
  • by role: --role hero
  • by colour (tells identical models apart): --color 255,0,0
  • the single closest to a point/actor: --near X,Y,Z / --near-id N with --nearest (a predicate β€” "the closest" β€” not an index)
  • --full dumps every attribute (colour, role, size, yaw), so you can spot the distinguishing field and filter by it (or just read the id)

So "the red prius" β†’ actors --filter '*prius*' --color 255,0,0; "the prius nearest the ego" β†’ actors --filter '*prius*' --near-id <ego> --nearest. Either yields an id to hand to telemetry / bounding-boxes / control-vehicle / control-spectator. For junctions ("3-way intersections") use the map-waypoints skill's junctions --arms 3.

Moving objects: a distance is a single-frame snapshot and changes as actors move, so --nearest is only "closest right now". The id is the stable handle β€” resolve once, then act on the id; re-query for a fresh distance. (An inherent order only exists in special cases like a queue of vehicles along a lane β€” that is a lane query, not this generic actor list.)

Instructions

Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: actors --filter/--role/--color [--nearest] until one remains β†’ its id
- [ ] Step 3: hand the id to the action skill; or use snapshot/level-bbox/raycast/ground

Commands need CARLA_HOST/CARLA_PORT from scripts/env.sh. Negative coordinates: use the = form (--near=-24,-57,0.6).

Step 1: Check prerequisites

bash scripts/check_env.sh

Step 2-3: Query

source scripts/env.sh

python3 scripts/world_data.py actors                              # everything (non-traffic)
python3 scripts/world_data.py actors --filter '*prius*'           # all priuses (ids + locations)
python3 scripts/world_data.py actors --filter '*prius*' --full    # + color/role/size to tell them apart
python3 scripts/world_data.py actors --filter '*prius*' --color 255,0,0          # the red one
python3 scripts/world_data.py actors --filter '*prius*' --near-id 100 --nearest  # closest to actor 100
python3 scripts/world_data.py snapshot                            # frame / time / count
python3 scripts/world_data.py level-bbox --label TrafficSigns     # static boxes by label
python3 scripts/world_data.py raycast --from=0,0,1 --to=50,0,1    # semantic hits along a ray
python3 scripts/world_data.py ground --at=20,20,50               # drop to the ground
python3 scripts/world_data.py ros-topics                          # ROS 2 topic tree per actor

Resolving ROS 2 topics (ros-topics)

The same resolver job, one level up: it maps live actors to the topics the server should be publishing, and names the reason for each silent one. It needs no ROS 2 installation β€” it derives the names the way the server does, so it answers the half ros2 topic list cannot ("the topic is missing β€” why?").

world topics (exist whenever the server runs with --ros2):
  rt/clock       [rosgraph_msgs/Clock]  every tick
  rt/carla/map   [std_msgs/String]      OpenDRIVE, LATCHED, re-sent on map load
  rt/tf          [tf2_msgs/TFMessage]   per registered actor, unless ros_publish_tf=false

hero vehicle(s): 1
  id=112 vehicle.lincoln.mkz_2017 ros_name=hero
    <- rt/carla/hero/vehicle_control_cmd     [carla_msgs/CarlaEgoVehicleControl]
    <- rt/carla/hero/ackermann_control_cmd   [ackermann_msgs/AckermannDriveStamped]

sensors: 2
  id=113 sensor.camera.rgb ros_name=front  [NOT enabled_for_ros -> SILENT]
    -> rt/carla/hero/front/image        [sensor_m
FAQ

What if several objects match my description?

The skill keeps narrowing by a distinguishing detail, because objects have no meaningful order to rank them by.

Can it look up the map's layout information?

Yes. It can read the bounding boxes of map items by label and project a point down to the ground.

Can it help with ROS 2 topics?

Yes. It can list the ROS 2 topics each object should publish and explain why one is silent.

Details

Original description by the author

Queries the live CARLA world and resolves an entity description into a concrete actor id β€” find actors by type, role, or colour, or the single one nearest a point/actor; read the world snapshot; get static level bounding boxes by label; cast rays for semantic points; project a point to the ground; or (ros-topics) list the native ROS 2 topics each actor should be publishing and why any is silent. Identifies by stable attributes, not by any rank/order. Use when the user asks "what actors are here", "find the red prius", "the vehicle nearest the ego", "list the pedestrians", or needs a specific a

repo: carla-simulator/carla

Popularity

GitHub stars
15k
Ranking position
#11106
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills