Metadata-Version: 2.1
Name: sim-web-visualizer
Version: 0.5.0
Summary: Web based visualizer for simulators
Home-page: https://github.com/NVlabs/sim-web-visualizer
Author: Yuzhe Qin
Author-email: y1qin@ucsd.edu
Maintainer: Yuzhe Qin
Maintainer-email: y1qin@ucsd.edu
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.6,<3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy <=1.23.0
Requires-Dist: numpy-quaternion
Requires-Dist: transforms3d
Requires-Dist: dm-control >=1.0.0
Requires-Dist: anytree
Requires-Dist: trimesh
Requires-Dist: pycollada
Requires-Dist: mujoco >=2.2.0
Requires-Dist: meshcat-sim-web-fork
Provides-Extra: isaacgym
Requires-Dist: hydra-core ; extra == 'isaacgym'
Requires-Dist: gym ==0.23.1 ; extra == 'isaacgym'
Requires-Dist: rl-games ; extra == 'isaacgym'
Requires-Dist: torch ; extra == 'isaacgym'
Requires-Dist: pyvirtualdisplay ; extra == 'isaacgym'
Requires-Dist: omegaconf ; extra == 'isaacgym'
Requires-Dist: jinja2 ; extra == 'isaacgym'
Provides-Extra: sapien
Requires-Dist: mani-skill2 ; extra == 'sapien'

# Web-Based Visualizer for Simulation Environments

|  IsaacGym Simulator  | ![](doc/isaacgymenv/allegro.png) | ![](doc/isaacgymenv/cabinet.png) | ![](doc/isaacgymenv/dog.png) | ![](doc/isaacgymenv/kuka.png) | ![](doc/isaacgymenv/trifinger.png) |
|:--------------------:|:--------------------------------:|:--------------------------------:|:----------------------------:|:-----------------------------:|-----------------------------------:|
| **SAPIEN Simulator** | ![](doc/maniskill/assembly.png)  |   ![](doc/maniskill/avoid.png)   | ![](doc/maniskill/chair.png) | ![](doc/maniskill/insert.png) |         ![](doc/maniskill/ycb.png) |
| **Static URDF File** |     ![](doc/urdf/chair.png)      |     ![](doc/urdf/drawer.png)     |     ![](doc/urdf/dj.png)     |    ![](doc/urdf/piano.png)    |     ![](doc/urdf/kuka_allegro.png) |

This repository hosts a browser-based 3D viewer for physical simulators. It offers users the ability to observe
simulations directly within their web browser, as an alternative to the default visualizer that comes with the
simulator.

The main feature of this repo is that you only need to modify a server lines of your code to port the
visualization on the default simulator viewer to the web visualizer. This feature is especially useful for visualizing
simulation on a headless server. For example, train and visualize the IsaacGym tasks
inside [jupyter notebook](example/isaacgym/train_isaacgym_remote_server.ipynb) on a remote server.

## Installation

First install ZeroMQ libraries on your system:

```shell
apt install libzmq3-dev # For ubuntu
brew install zmq # For Mac
```

**Note:** this visualizer does not have a Python version requirement but
IsaacGym requires Python 3.6, 3.7, or 3.8

```shell
git clone https://github.com/NVlabs/sim-web-visualizer
cd sim-web-visualizer && git submodule update --init --recursive
pip install -e .

```

## Examples

### IsaacGym Web Visualizer

Check the [IsaacGym Example](example/isaacgym/README.md) for information on running the
Web Visualizer on [IsaacGymEnvs](https://github.com/NVIDIA-Omniverse/IsaacGymEnvs).

![isaac](doc/isaac.gif)

### SAPIEN Web Visualizer

Check the [SAPIEN Example](example/sapien/README.md) for information on running the
Web Visualizer on [ManiSkill2](https://github.com/haosulab/ManiSkill2).

![sapien](doc/sapien_side_by_side.gif)

### URDF Web Visualizer

Check the [URDF Example](example/visualize_urdf/README.md) for information to visualize a static URDF file on Web
Visualizer.

## Troubleshooting

`Can "Upgrade" only to "WebSocket"`

This issue may arise if you have entered an incorrect URL into your browser. Ensure that the URL is in the
format `http://YOUR_IP_ADDRESS:YOUR_PORT_NUM/static/`. The `/static/` part of the URL is essential and should not be
omitted.

`404: Not Found`

Similar to the previous issue, the correct URL suffix should be `/static/`, and not `/static`. The trailing `/` is
mandatory and should not be omitted.

## Citing This Repo

This repository is a part of the [AnyTeleop Project](http://anyteleop.com/). If you use this work, kindly reference it
as:

```shell
@inproceedings{qin2023anyteleop,
  title     = {AnyTeleop: A General Vision-Based Dexterous Robot Arm-Hand Teleoperation System},
  author    = {Qin, Yuzhe and Yang, Wei and Huang, Binghao and Van Wyk, Karl and Su, Hao and Wang, Xiaolong and Chao, Yu-Wei and Fox, Dieter},
  booktitle = {Robotics: Science and Systems},
  year      = {2023}
}
```

## Acknowledgments

This repository is developed upon [MeshCat](https://github.com/rdeits/meshcat). The URDF loader is
adapted from [yourdfpy](https://github.com/clemense/yourdfpy).
We extend our appreciation to the developers and custodians of these open sources projects.

## License and Disclaimer

Web-Based Visualizer for Simulation Environments is released under the [MIT License](LICENSE).
