control-lights

Controls CARLA map light sources via the LightManager API.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Manually scripting CARLA's LightManager to control street lamps, building lights, and vehicle lights requires knowing the API, light groups, and common failure modes like synchronous-mode snapshot issues. This Skill encodes the vetted procedure so an agent can switch, colour, and dim the world's light sources without improvising. ## Core Features & Use Cases - Group-based light control: Turn street, building, vehicle, other, or all light groups on/off, and set colour (RGB) and intensity per group. - Day-night cycle toggle: Enable or disable automatic lights-at-night switching tied to the sun position. - Prerequisite checking: A check_env.sh script verifies the carla Python module is importable and the server is reachable before any command runs. - Use Case: To create a lit-up night city scene, set the sun below the horizon with set-weather, then run lights.py on --group street --color 255,220,150 --intensity 2000 and on --group building. ## Quick Start Ask the agent to turn on the street lights with a warm colour and high intensity so the city is lit up at night.

Frequently Asked Questions about control-lights

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

FAQPage Schema
How do I turn on street lights in CARLA?▼

Use the LightManager via lights.py: run `python3 scripts/lights.py on --group street` after sourcing env.sh with CARLA_HOST and CARLA_PORT set. You can add --color and --intensity to set colour and brightness in the same call.

How to make CARLA lights turn on automatically at night?▼

Run `python3 scripts/lights.py day-night on`, which calls the LightManager's set_day_night_cycle. The simulator then switches lights on and off automatically based on the sun position.

What is the difference between control-lights and toggle-env-objects in CARLA?▼

control-lights toggles the light sources a lamp emits through the LightManager, while toggle-env-objects hides the lamp post mesh geometry. You can have a visible lamp that is off, or illumination with the post hidden.

Why are CARLA light changes not visible?▼

Light effects require a rendered server; a headless -nullrhi server shows nothing. Changes also wash out in daytime, so set a negative sun_altitude_angle with set-weather to see them clearly at night.

Why does CARLA list show zero lights for a group?▼

Some maps have few or no light sources in a given group, especially building lights. Try `--group all` to enumerate every light the map actually contains.

What CARLA versions does the LightManager API support?▼

This Skill was tested against CARLA 0.9.16 and requires the carla Python module importable by the active interpreter plus a reachable running server. A client/server version mismatch can abort structured calls, so matching versions is recommended.