Skip to content

Commit

Permalink
0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Jun 7, 2024
1 parent b77909a commit dcd992b
Show file tree
Hide file tree
Showing 29 changed files with 82 additions and 174 deletions.
81 changes: 21 additions & 60 deletions docs/source/examples/09_urdf_visualizer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,34 @@ and viser. It can also take a path to a local URDF file as input.
from __future__ import annotations
import time
from pathlib import Path
import numpy as onp
import tyro
import viser
from robot_descriptions.loaders.yourdfpy import load_robot_description
from viser.extras import ViserUrdf
# A subset of robots available in the robot_descriptions package.
ROBOT_MODEL_LIST = (
"panda_description",
"ur10_description",
"ur3_description",
"ur5_description",
"cassie_description",
"skydio_x2_description",
"allegro_hand_description",
"barrett_hand_description",
"robotiq_2f85_description",
"atlas_drc_description",
"atlas_v4_description",
"draco3_description",
"g1_description",
"h1_description",
"anymal_c_description",
"go2_description",
"mini_cheetah_description",
)
def main() -> None:
# Start viser server.
Expand Down Expand Up @@ -97,64 +117,5 @@ and viser. It can also take a path to a local URDF file as input.
time.sleep(10.0)
ROBOT_MODEL_LIST = (
"edo_description",
"fanuc_m710ic_description",
"gen2_description",
"gen3_description",
"iiwa14_description",
"iiwa7_description",
"panda_description",
"poppy_ergo_jr_description",
"ur10_description",
"ur3_description",
"ur5_description",
"z1_description",
"bolt_description",
"cassie_description",
"rhea_description",
"spryped_description",
"upkie_description",
"baxter_description",
"nextage_description",
"poppy_torso_description",
"yumi_description",
"cf2_description",
"skydio_x2_description",
"double_pendulum_description",
"finger_edu_description",
"simple_humanoid_description",
"trifinger_edu_description",
"allegro_hand_description",
"barrett_hand_description",
"robotiq_2f85_description",
"atlas_drc_description",
"atlas_v4_description",
"draco3_description",
"ergocub_description",
"g1_description",
"h1_description",
"icub_description",
"jaxon_description",
"jvrc_description",
"r2_description",
"romeo_description",
"sigmaban_description",
"talos_description",
"valkyrie_description",
"a1_description",
"aliengo_description",
"anymal_b_description",
"anymal_c_description",
"b1_description",
"go1_description",
"go2_description",
"hyq_description",
"laikago_description",
"mini_cheetah_description",
"minitaur_description",
"solo_description",
)
if __name__ == "__main__":
tyro.cli(main)
1 change: 0 additions & 1 deletion examples/01_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import imageio.v3 as iio
import numpy as onp

import viser


Expand Down
1 change: 0 additions & 1 deletion examples/02_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import time

import numpy as onp

import viser


Expand Down
3 changes: 1 addition & 2 deletions examples/03_gui_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
import time

import numpy as onp
from typing_extensions import assert_never

import viser
from typing_extensions import assert_never


def main() -> None:
Expand Down
1 change: 0 additions & 1 deletion examples/05_camera_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import time

import numpy as onp

import viser
import viser.transforms as tf

Expand Down
1 change: 0 additions & 1 deletion examples/06_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import numpy as onp
import trimesh

import viser
import viser.transforms as tf

Expand Down
3 changes: 1 addition & 2 deletions examples/07_record3d_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

import numpy as onp
import tyro
from tqdm.auto import tqdm

import viser
import viser.extras
import viser.transforms as tf
from tqdm.auto import tqdm


def main(
Expand Down
1 change: 0 additions & 1 deletion examples/08_smpl_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import numpy as np
import numpy as onp
import tyro

import viser
import viser.transforms as tf

Expand Down
83 changes: 22 additions & 61 deletions examples/09_urdf_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,31 @@

import numpy as onp
import tyro
from robot_descriptions.loaders.yourdfpy import load_robot_description

import viser
from robot_descriptions.loaders.yourdfpy import load_robot_description
from viser.extras import ViserUrdf

# A subset of robots available in the robot_descriptions package.
ROBOT_MODEL_LIST = (
"panda_description",
"ur10_description",
"ur3_description",
"ur5_description",
"cassie_description",
"skydio_x2_description",
"allegro_hand_description",
"barrett_hand_description",
"robotiq_2f85_description",
"atlas_drc_description",
"atlas_v4_description",
"draco3_description",
"g1_description",
"h1_description",
"anymal_c_description",
"go2_description",
"mini_cheetah_description",
)


def main() -> None:
# Start viser server.
Expand Down Expand Up @@ -85,64 +105,5 @@ def _(_):
time.sleep(10.0)


ROBOT_MODEL_LIST = (
"edo_description",
"fanuc_m710ic_description",
"gen2_description",
"gen3_description",
"iiwa14_description",
"iiwa7_description",
"panda_description",
"poppy_ergo_jr_description",
"ur10_description",
"ur3_description",
"ur5_description",
"z1_description",
"bolt_description",
"cassie_description",
"rhea_description",
"spryped_description",
"upkie_description",
"baxter_description",
"nextage_description",
"poppy_torso_description",
"yumi_description",
"cf2_description",
"skydio_x2_description",
"double_pendulum_description",
"finger_edu_description",
"simple_humanoid_description",
"trifinger_edu_description",
"allegro_hand_description",
"barrett_hand_description",
"robotiq_2f85_description",
"atlas_drc_description",
"atlas_v4_description",
"draco3_description",
"ergocub_description",
"g1_description",
"h1_description",
"icub_description",
"jaxon_description",
"jvrc_description",
"r2_description",
"romeo_description",
"sigmaban_description",
"talos_description",
"valkyrie_description",
"a1_description",
"aliengo_description",
"anymal_b_description",
"anymal_c_description",
"b1_description",
"go1_description",
"go2_description",
"hyq_description",
"laikago_description",
"mini_cheetah_description",
"minitaur_description",
"solo_description",
)

if __name__ == "__main__":
tyro.cli(main)
3 changes: 1 addition & 2 deletions examples/10_realsense.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
import numpy as np
import numpy.typing as npt
import pyrealsense2 as rs # type: ignore
from tqdm.auto import tqdm

import viser
from tqdm.auto import tqdm


@contextlib.contextmanager
Expand Down
3 changes: 1 addition & 2 deletions examples/11_colmap_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
import imageio.v3 as iio
import numpy as onp
import tyro
from tqdm.auto import tqdm

import viser
import viser.transforms as tf
from tqdm.auto import tqdm
from viser.extras.colmap import (
read_cameras_binary,
read_images_binary,
Expand Down
1 change: 0 additions & 1 deletion examples/12_click_meshes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import time

import matplotlib

import viser


Expand Down
1 change: 0 additions & 1 deletion examples/15_gui_in_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from typing import Optional

import numpy as onp

import viser
import viser.transforms as tf

Expand Down
1 change: 0 additions & 1 deletion examples/17_background_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import numpy as onp
import trimesh
import trimesh.creation

import viser

server = viser.ViserServer()
Expand Down
1 change: 0 additions & 1 deletion examples/18_splines.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import time

import numpy as onp

import viser


Expand Down
1 change: 0 additions & 1 deletion examples/19_get_renders.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import imageio.v3 as iio
import numpy as onp

import viser


Expand Down
1 change: 0 additions & 1 deletion examples/20_scene_pointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import trimesh
import trimesh.creation
import trimesh.ray

import viser
import viser.transforms as tf

Expand Down
3 changes: 1 addition & 2 deletions examples/22_games.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

import numpy as onp
import trimesh.creation
from typing_extensions import assert_never

import viser
import viser.transforms as tf
from typing_extensions import assert_never


def main() -> None:
Expand Down
3 changes: 1 addition & 2 deletions examples/23_plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
import numpy as onp
import plotly.express as px
import plotly.graph_objects as go
from PIL import Image

import viser
from PIL import Image


def create_sinusoidal_wave(t: float) -> go.Figure:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "viser"
version = "0.1.31"
version = "0.2.0"
description = "3D visualization + Python"
readme = "README.md"
license = { text="MIT" }
Expand Down Expand Up @@ -40,7 +40,7 @@ dependencies = [
[project.optional-dependencies]
dev = [
"pyright>=1.1.308",
"ruff==0.4.3",
"ruff==0.4.6",
"pre-commit==3.3.2",
]
examples = [
Expand Down
8 changes: 6 additions & 2 deletions src/viser/_client_autobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ def ensure_client_is_built() -> None:
elif not (build_dir / "index.html").exists():
rich.print("[bold](viser)[/bold] No client build found. Building now...")
build = True
elif _modified_time_recursive(client_dir / "src") > _modified_time_recursive(
build_dir
elif (
# We should be at least 10 seconds newer than the last build.
# This buffer is important when we install from pip, and the src/ +
# build/ directories have very similar timestamps.
_modified_time_recursive(client_dir / "src")
> _modified_time_recursive(build_dir) + 10.0
):
rich.print(
"[bold](viser)[/bold] Client build looks out of date. Building now..."
Expand Down
Loading

0 comments on commit dcd992b

Please sign in to comment.