world-data
Skill này làm gì
Skill tìm trong mô phỏng CARLA đang chạy đối tượng bạn mô tả, chẳng hạn một xe đỏ hoặc người đi bộ gần nhất, rồi báo cáo ID của nó. Skill dành cho người muốn dùng các công cụ khác trên đúng đối tượng.
Khi nào nên dùng
- ✓Khi bạn mô tả một xe hoặc người và cần số ID để dùng ở bước khác.
- ✓Khi bạn muốn đối tượng gần nhất với một điểm hoặc với một đối tượng khác trong mô phỏng.
- ✓Khi bạn cần ảnh chụp mọi thứ đang có trong thế giới mô phỏng.
Liên kết skill
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/world-data/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể tìm chiếc xe đỏ gần xe thử nghiệm của tôi nhất trong mô phỏng CARLA và cho tôi ID của nó không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent lọc các đối tượng trong mô phỏng theo loại, vai trò, màu sắc hoặc khoảng cách, và tiếp tục thu hẹp cho đến khi chỉ còn một. Sau đó nó báo cáo ID của đối tượng đó.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Query the world (and resolve entities)
Paths.
scripts/…andreferences/…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 Nwith--nearest(a predicate — "the closest" — not an index) --fulldumps 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
Câu hỏi thường gặp
Nếu nhiều đối tượng khớp mô tả thì sao?
Skill tiếp tục thu hẹp theo một chi tiết phân biệt, vì các đối tượng không có thứ tự có ý nghĩa để xếp hạng.
Nó có tra cứu thông tin bố cục bản đồ không?
Có. Skill có thể đọc hộp bao của các vật thể bản đồ theo nhãn và chiếu một điểm xuống mặt đất.
Nó có giúp được với các topic ROS 2 không?
Có. Skill có thể liệt kê các topic ROS 2 mà mỗi đối tượng nên publish và giải thích vì sao một topic im lặng.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #11106
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
create-leaderboard-route
15kGiúp agent của bạn tạo file tuyến đường CARLA Leaderboard bằng cách đặt các điểm waypoint và trigger kịch bản từ camera của simulator, rồi kiểm tra và sắp xếp chúng.
package-leaderboard-agent
15kGiúp agent của bạn đóng gói một agent lái xe thành image Docker để nộp lên CARLA Leaderboard, kiểm tra cấu trúc thư mục và thử rằng image nạp được agent.
read-leaderboard-results
15kGiúp agent của bạn đọc file kết quả CARLA Leaderboard, giải thích điểm và vi phạm của từng tuyến, và chấm lại một lần chạy theo phiên bản luật khác.
run-leaderboard-evaluation
15kGiúp agent của bạn chạy bộ đánh giá CARLA Leaderboard trên một tập tuyến với agent lái xe, kiểm tra thiết lập trước và lưu checkpoint để có thể tiếp tục.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.