Getting Started¶
To get a quick overview of what you can do with vuer
, check out the following:
take a look at the basic tutorial or the tutorial for robotics:
or try to take a look at the example gallery here
Setting up the conda environment:
conda create -n vuer python=3.8
conda activate vuer
Install vuer — the latest version is 0.0.34-rc2
on pypi.
pip install -U 'vuer[all]==0.0.34-rc2'
Now you should be able to run scripts show in the examples, and look at the
results on vuer.ai. To view the scene in VR or AR headsets, you
need to install ngrok
(see setting up ngrok) to promote the websocket
to wss
.
Using ngrok to promote to wss://
You need to install ngrok
to promote the local vuer server
from ws://localhost:8012 to wss://xxxx.ngrok.io, (note the double
w[ss] in the protocol), and pass it as a query parameter that
looks like this:
https://vuer.ai?ws=wss://xxxxx.ngrok.io
Note the repeated ws
and then wss://
in the query string.
Running The Example Gallery¶
All examples can be run from the document folder in the vuer repository: vuer.git/docs. First clone the vuer repo for example code,
cd ~ # assume working in home directory
git clone https://github.com/vuer-ai/vuer.git
Now, you need to install a few optional dependencies such as open3d
and trimesh
for loading and processing point cloud and mesh data. The core vuer itself odes not
depend on these libraries.
We provide an installation configuration to install these dependencies automatically:
pip install -U 'vuer[example]==0.0.34-rc2'
Open3D for Apple Sillicon (2024-03)
The newest version of Open3D seems not compatible with Apple Silicon.
If you are using M1, M2 or M3 macs, install the open3d==0.15.1
or
other patches of 0.15
.
Downloading Examples and 3D Assets¶
To run the examples, you need to download some example 3D assets. The asset files are stored in this repo with git lfs.
If you haven’t, you should follow the git lfs installation instructions to set up git lfs repository using PackageCloud and to install git lfs extension by following the instructions here.
Optional: To minimize efforts, we provide sample command lines here that we have tested to work on a computer running x64 Ubuntu.
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
With a working installation of git lfs
, assets should be put into the same folder
where the main vuer
repo was cloned by running,
cd ~ # assume working in home directory
git lfs clone https://github.com/vuer-ai/assets
# Download optional assets for all examples
cd assets/robots
make # Download some example robot URDFs
After this, you can find code included in the official vuer examples under
vuer/docs/examples
. To run the Trimesh examples, do
cd ~ # assume working in home directory
cd vuer/docs/examples
python 01_trimesh.py
Follow the instructions in the command line to view the visualization. Enjoy!
Developing Vuer (Optional)¶
If you want to develop vuer, you can install it in editable mode plus dependencies relevant for building the documentations:
cd vuer
pip install -e '.[all]'
To build the documentations, run
make docs