算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
sensors-visualization【设计与创意】Configure SMARTS sensor observations, optional Panda3D rendering, Envision recording and replay, and safe diagnostics without conflating CPU checks with graphics services.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route when an agent needs additional SMARTS observations, camera/grid
outputs, custom shader renders, Envision state streaming or replay, or a
read-only check of rendering and replay prerequisites. Keep the simulation
lifecycle and environment creation in simulation-environments; use
cli-integrations for exact scl command syntax. Frontend npm development,
raw media, and long-running servers are outside this route.
drivable_area_grid_map, occupancy_grid_map, top_down_rgb, and
custom_renders as software-rendering features. They require the camera
extra and a usable Panda3D/OpenGL offscreen or X11 display.occlusion_map also requires an occupancy map with identical width and
height. It is a rendered output, not a CPU-only visibility calculation.Read the linked references before building an interface:
Use AgentInterface with explicit dataclass values when a non-default shape,
range, or lookahead matters. Boolean True resolves to the corresponding
config dataclass; False disables the sensor. The interface defaults
accelerometer and lane positions on, but leaves most expensive or optional
sensors off. AgentInterface.from_type(AgentType.Full, ...) is convenient but
also enables rendered observations and lidar; do not use it as a cheap smoke
interface.
from smarts.core.agent_interface import (
AgentInterface, Waypoints, NeighborhoodVehicles, RGB, OGM,
)
interface = AgentInterface(
waypoint_paths=Waypoints(lookahead=32),
neighborhood_vehicle_states=NeighborhoodVehicles(radius=50),
top_down_rgb=RGB(width=128, height=128, resolution=100 / 128),
occupancy_grid_map=OGM(width=128, height=128, resolution=100 / 128),
action=..., # select an action type in the environment route
)
Before stepping, inspect the environment's per-agent observation space and
confirm that the policy reads only enabled fields. After a step, check None
for disabled optional fields and preserve the named observation structures;
do not assume every observation is a flat NumPy array.
AgentInterface, construct low-dimensional sensor
configs, and run a bounded environment test through the sibling lifecycle
route. This does not require Panda3D.scripts/check_rendering.py, preferably under
xvfb-run -a. Use --probe-offscreen only for a bounded construction and
teardown probe; it is not a renderer behavior test.scripts/inspect_replay_records.py on a
file or directory. It never sends data, starts a server, or modifies files.step() time and memory.The prepared SMARTS 2.0.1 environment passed package imports, live interface and lidar signature inspection, and a Panda3D/SMARTS renderer import smoke under Xvfb. That is evidence for importability only. Full renderer behavior, large image observations, Visdom, and a live Envision server remain optional or unverified. The bundled helpers report these limits rather than claiming a successful renderer or visualization session.