Visualization¶
ViserViewer is a browser-based viewer, built on Viser, for inspecting an env's scene and
link frames outside the Genesis viewer. It can also record a rollout to a self-contained .html page (or a .viser
file) that replays in a browser. Install it with the vis extra (pip install 'eden-world[vis]', or
uv sync --inexact --extra vis in a checkout). The sensors and rendering guide
shows recording; examples/recipes/rendering/viser_recording.py is a runnable example.
eden/extensions/visualization/ has no __init__.py, so the docs build finds the class below through its
eden/extensions search path, and any module path it shows reads visualization.viser. Import it as above.
ViserViewer
¶
Viser visualizer for Eden.
This extension allows visualizing Eden environments using the Viser library.
Source code in eden/extensions/visualization/viser.py
Attributes¶
Methods:¶
build
¶
Build the visualization scene from the Eden environment.
Source code in eden/extensions/visualization/viser.py
add_entity
¶
Source code in eden/extensions/visualization/viser.py
start_recording
¶
Record the current scene and subsequent updates to a .html or .viser file.
Each update advances playback by env.dt, or by 1 / fps when
supplied. HTML exports include the interactive player and scene data.
Call from the simulation thread, alongside update and stop_recording.
Everything knowable up front is checked here rather than at export time -- the suffix, the frame duration, that Viser can render the requested format, and that the output directory is writable. Viser's serializer is single-use, so an export that only fails once the run is over has lost the trajectory.
Source code in eden/extensions/visualization/viser.py
stop_recording
¶
stop_recording() -> Path
Save the recording and return its path; fail if no recording is active.
The export is atomic: it writes a sibling temporary file and renames it into
place, so a failure leaves the destination -- including a recording already
saved there -- untouched instead of truncated. Viser's serializer is single-use,
so a failed export ends the recording; that is what the checks in
:meth:start_recording are there to make unlikely.
Source code in eden/extensions/visualization/viser.py
update
¶
Update the visualization with current simulation state.