bounding-boxes

Extracts 3D actor bounding boxes from CARLA and projects them into camera images as 2D annotations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Annotating objects in CARLA simulator camera frames for detection datasets requires manual camera-intrinsics math and pose synchronization, which is error-prone when done ad hoc. This Skill reads actor and level 3D bounding boxes, draws them in the world, and projects them into a camera frame as 2D boxes with a JSON sidecar. ## Core Features & Use Cases - List 3D box geometry: Report dimensions (LxWxH from extent) of every matching actor via list --filter vehicle.*. - Draw 3D boxes in the world: Overlay tracking debug boxes that follow moving actors for a configurable duration on a rendered server. - Project to 2D annotations: Capture one camera frame, project each actor's 8 world vertices through the camera intrinsics, and write an annotated PNG plus a JSON of xyxy boxes. - Use Case: Spawn an RGB camera on the ego vehicle, then run project --camera <id> --filter vehicle.* to produce boxes.png and boxes.json ready for detection-dataset tooling. ## Quick Start Ask the agent to put bounding boxes on the vehicles visible in the ego camera and save the annotated image with a JSON of 2D boxes.

Frequently Asked Questions about bounding-boxes

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

FAQPage Schema
How do I get 2D bounding boxes from a CARLA camera image?▼

Use the project command with an existing RGB camera: it captures one frame, builds intrinsics from the camera fov and resolution, transforms each actor's 3D box vertices into camera space, and writes an annotated PNG plus a JSON of xyxy boxes.

How do I draw 3D bounding boxes around vehicles in CARLA?▼

Run the draw command with a filter such as vehicle.* to overlay green 3D boxes via world.debug.draw_box. The boxes are re-stamped each frame for the configured duration so they track moving actors, and the server must be rendered, not headless.

Does bounding box projection work on a headless CARLA server?▼

Projection works headless because it only reads a camera frame and actor poses, but the draw command produces no visible output on a -nullrhi server since debug overlays require rendering. Use project or list for headless annotation workflows.

Why does the project command find no boxes in the camera frame?▼

No boxes appear when actors are behind the camera, beyond the --max-dist range, fully off-frame, or excluded by the filter. Raise --max-dist, widen the filter, and confirm vehicles are actually in the camera's view.

Why are projected 2D boxes misaligned with the actors?▼

Misalignment happens when the captured frame and actor poses come from different ticks during fast motion in asynchronous mode. Capture in synchronous mode so the frame and poses belong to the same simulation tick.