Viser is a Python library designed for interactive 3D visualization, primarily targeting applications in computer vision and robotics. It provides a rich API for visualizing 3D primitives and constructing interactive GUI elements, all delivered through a responsive, web-based client that enables easy use over SSH and in Jupyter notebooks. The library is actively maintained with frequent releases, currently at version 1.0.26.
pip install viserVerified import paths — ran on the pinned version, not inferred.
This quickstart code initializes a Viser server, adds a red sphere to the 3D scene, and includes a GUI slider to interactively control the sphere's X-axis position. Access the visualization by navigating to the printed URL in your web browser.
Instead of `handle.position[0] += 0.1`, use `new_pos = list(handle.position); new_pos[0] += 0.1; handle.position = tuple(new_pos)` (or similar explicit reassignment with `numpy` arrays).
Ensure that your `viser` Python package version matches the client version it attempts to serve. If manually hosting a client, ensure it's built from a compatible `viser` source.
This is an environment-specific issue. Potential workarounds include ensuring the Windows registry correctly associates `.js` files with `text/javascript` MIME type, or trying different web browsers.
Optimize your data updates to minimize frequency and size where possible. For purely static scene exports without interactivity, consider using `server.get_scene_serializer().serialize()` to save the scene state to a `.viser` file.
Run `pip install viser` in your terminal to install the library.
Start the viser server on a different, available port, for example: `server = viser.ViserServer(port=8082)`.
Update your code to use `viser.transforms.SRT3` where `viser.transforms.SE3` was previously used.
Convert the color array to a NumPy array of floats with values between 0 and 1, shaped `(N, 3)` or `(N, 4)`, for example: `colors=my_rgb_array.astype(np.float32) / 255.0` (if `my_rgb_array` contains 0-255 integers).