read-sensor

Captures, displays, and summarizes data streams from CARLA simulator sensors.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Reading data from CARLA simulator sensors is error-prone: passive capture deadlocks the client, camera auto-exposure ruins early frames, and ROS 2 topic configuration is opaque. This Skill provides tested commands to view, save, and inspect any sensor without hitting those failure modes. ## Core Features & Use Cases - Live visualization: Open a pygame window showing camera feeds (depth/semantic auto-colorized) or top-down lidar scatter plots, including a tiled multi-sensor grid view. - Dataset capture: Save camera frames as PNG, lidar sweeps as .ply point clouds, and IMU/GNSS/radar/collision readings as JSONL, using lock-step synchronous capture that avoids the client deadlock of passive recording. - ROS 2 introspection: Report the native ROS 2 topics, QoS profiles, and enabled-for-ROS state of a sensor without needing ROS 2 installed. - Use Case: A user asks to "save 5 seconds from the front camera" — the Skill selects the sensor by id, type, or parent actor, takes the world clock, discards warm-up frames, and writes numbered PNGs to the output directory. ## Quick Start Ask the agent to show the live feed from a CARLA camera sensor by its id, or to save ten seconds of its frames into a local capture folder.

Frequently Asked Questions about read-sensor

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

FAQPage Schema
How do I save camera images from a CARLA sensor?▼

Run the save command with the sensor id and an output directory, for example read_sensor.py save --id 123 --out ./capture --seconds 10. Cameras write PNG files, lidar writes .ply point clouds, and other sensors append rows to data.jsonl.

How do I view a CARLA camera or lidar feed in a live window?▼

Use the show command with a sensor id to open a pygame window rendering camera images or a top-down lidar scatter. A display is required; on headless machines use the save command instead. The grid command tiles multiple sensors in one window.

Why does my CARLA recording client freeze when saving frames?▼

Calling save_to_disk inside the sensor listen callback deadlocks the client, measured stalling after a few hundred frames. The fix is lock-step capture: the client takes the world clock, ticks once per frame, and encodes images from the main loop via a queue.

Can I read CARLA sensor data through ROS 2 topics?▼

Yes, when the server runs with --ros2 the sensor publishes native DDS topics such as rt/carla/<name>/image. The ros-info command lists topics, QoS, and enabled-for-ros state without ROS 2 installed; subscribers need the matching FastDDS profile and use_sim_time.

Does this work with CARLA 0.10.0 and the UE5 line?▼

Yes, reading sensor data is unchanged on 0.10.0, including new sensors like fisheye cameras and hss_lidar. Note that enable_for_ros moved from carla.Actor to carla.ServerSideSensor, and rt/carla/map no longer exists.

Why are the first saved camera frames dark or black?▼

CARLA cameras open underexposed and the auto exposure ramps over several frames. The save command discards a configurable number of warm-up frames (default 15) so the capture starts after exposure has settled.