Skip to content

Commit 5e763e5

Browse files
committed
examples(teleop): package under isaacteleop_examples
No flat sibling imports -- the eleven examples are independent -- but the tree kept its pyproject under python/, so it needed the same conversion for one install command to work everywhere. config/ moves inside the package: dex_bimanual_example and full_bimanual_reordering_example resolve it from __file__, so the dex retargeting YAML has to travel with the modules. Six scripts walked up four parents to reach the tree root -- the install prefix for PLUGIN_ROOT_DIR, the checkout for the so101_leader build path. Three levels deeper that lands on the example's python/ directory, so they are parents[5] now. The install tree keeps the same shape, so one depth serves both. Part of #985. Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
1 parent d33cb08 commit 5e763e5

27 files changed

Lines changed: 76 additions & 44 deletions

docs/source/device/trackers.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ axis inputs. Uses standard OpenXR action bindings.
233233
- Examples:
234234

235235
- :code-file:`examples/retargeting/python/isaacteleop_examples/retargeting/sources_example.py`
236-
- :code-file:`examples/teleop/python/locomotion_retargeting_example.py`
237-
- :code-file:`examples/teleop/python/gripper_retargeting_example_simple.py`
236+
- :code-file:`examples/teleop/python/isaacteleop_examples/teleop/locomotion_retargeting_example.py`
237+
- :code-file:`examples/teleop/python/isaacteleop_examples/teleop/gripper_retargeting_example_simple.py`
238238

239239
FullBodyTracker
240240
~~~~~~~~~~~~~~~
@@ -312,7 +312,7 @@ utility internally.
312312
- Examples:
313313

314314
- :code-file:`examples/schemaio/pedal_printer.cpp`
315-
- :code-file:`examples/teleop/python/foot_pedal_locomotion_example.py`
315+
- :code-file:`examples/teleop/python/isaacteleop_examples/teleop/foot_pedal_locomotion_example.py`
316316

317317
.. note::
318318

@@ -383,5 +383,5 @@ For end-to-end usage patterns combining trackers with a ``DeviceIOSession``, see
383383
For higher-level usage with the teleop session manager and retargeting, see:
384384

385385
- :code-file:`examples/retargeting/python/isaacteleop_examples/retargeting/sources_example.py`
386-
- :code-file:`examples/teleop/python/gripper_retargeting_example_simple.py`
387-
- :code-file:`examples/teleop/python/locomotion_retargeting_example.py`
386+
- :code-file:`examples/teleop/python/isaacteleop_examples/teleop/gripper_retargeting_example_simple.py`
387+
- :code-file:`examples/teleop/python/isaacteleop_examples/teleop/locomotion_retargeting_example.py`

docs/source/getting_started/quick_start.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ env file and start the service with it:
130130
python -m isaacteleop.cloudxr.service start --cloudxr-env-config ./custom.env
131131
132132
The same ``--cloudxr-env-config`` flag is available on the teleop examples under
133-
``examples/teleop/python/``, which register CloudXR's launcher arguments through
133+
``examples/teleop``, which register CloudXR's launcher arguments through
134134
``CloudXRLauncher.add_launcher_arguments()`` — but it applies only when the
135135
example is the one starting the runtime. With a service already running the
136136
example attaches to it instead, and prints which settings it had to ignore (see
@@ -339,7 +339,7 @@ pipeline: reading XR controller input via CloudXR, retargeting it through the
339339

340340
.. code-block:: bash
341341
342-
python examples/teleop/python/gripper_retargeting_example_simple.py
342+
python -m isaacteleop_examples.teleop.gripper_retargeting_example_simple
343343
344344
Once running, squeeze the controller triggers on your XR headset to control
345345
the gripper. You should see periodic status output:
@@ -356,7 +356,7 @@ the gripper. You should see periodic status output:
356356
...
357357
358358
The example runs for 20 seconds and then exits. To try other examples, see
359-
``examples/teleop/python/`` — for instance:
359+
``examples/teleop`` — for instance:
360360

361361
- ``se3_retargeting_example.py`` — maps hand or controller poses to
362362
end-effector poses (absolute or relative)

docs/source/getting_started/teleop_session.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ Examples
444444
Complete Examples
445445
^^^^^^^^^^^^^^^^^
446446

447-
#. **Simplified Gripper Example**: ``examples/teleop/python/gripper_retargeting_example_simple.py``
447+
#. **Simplified Gripper Example**: ``examples/teleop/python/isaacteleop_examples/teleop/gripper_retargeting_example_simple.py``
448448
-- Shows the minimal configuration approach and demonstrates auto-creation
449449
of input sources.
450450

docs/source/references/cloudxr.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ launcher — do this for themselves and need no sourcing.
181181
Run teleop examples against the service
182182
---------------------------------------
183183

184-
Nothing to pass. The examples under ``examples/teleop/python/`` attach to
184+
Nothing to pass. The examples under ``examples/teleop`` attach to
185185
whatever runtime is serving, so with a service running they use it:
186186

187187
.. code-block:: bash
188188
189189
python -m isaacteleop.cloudxr.service start --accept-eula
190-
python examples/teleop/python/gripper_retargeting_example_simple.py
190+
python -m isaacteleop_examples.teleop.gripper_retargeting_example_simple
191191
192192
The example leaves the service running when it exits, so the headset stays
193193
connected and the next run reattaches to the same session.

docs/source/references/retargeting/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Available Retargeters
243243
For a complete hand retargeting example (e.g. ``HandsSource`` + ``DexHandRetargeter`` or
244244
``TriHandMotionControllerRetargeter``, connect and compute), see
245245
``g1_trihand_retargeting_example.py`` and ``dex_bimanual_example.py`` in the
246-
:code-dir:`examples/teleop/python` directory.
246+
:code-dir:`examples/teleop` directory.
247247

248248
.. dropdown:: LocomotionRootCmdRetargeter
249249

docs/source/references/retargeting/joint_space.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,15 @@ and flatten ``ee_pose`` + ``gripper_command`` into the env's task-space action l
102102
Run the example
103103
---------------
104104

105-
The repo ships ``examples/teleop/python/joint_space_device_example.py``:
105+
The repo ships ``examples/teleop``:
106106

107107
.. code-block:: console
108108
109+
$ uv pip install -e ./examples/teleop
110+
109111
# Consumes the so101_leader plugin over OpenXR (source cloudxr.env first):
110-
$ python joint_space_device_example.py --launch-plugin --mode joint --frames 8
111-
$ python joint_space_device_example.py --launch-plugin --mode ee --urdf so101_new_calib.urdf
112+
$ python -m isaacteleop_examples.teleop.joint_space_device_example --launch-plugin --mode joint --frames 8
113+
$ python -m isaacteleop_examples.teleop.joint_space_device_example --launch-plugin --mode ee --urdf so101_new_calib.urdf
112114
113115
Validate
114116
--------

examples/teleop/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

44
cmake_minimum_required(VERSION 3.20)
55
project(teleop_examples)
66

77
include(${CMAKE_SOURCE_DIR}/cmake/InstallPythonExample.cmake)
8-
install_python_example(DESTINATION examples/teleop/python)
8+
install_python_example(DESTINATION examples/teleop)

examples/teleop/pyproject.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
[build-system]
5+
requires = ["hatchling"]
6+
build-backend = "hatchling.build"
7+
8+
[project]
9+
# The dist name mirrors the import path, so an installed example claims no bare
10+
# top-level name in site-packages.
11+
name = "isaacteleop-examples-teleop"
12+
version = "0.1.0"
13+
description = "Isaac Teleop Retargeting Examples"
14+
requires-python = ">=3.11,<3.14"
15+
dependencies = [
16+
"isaacteleop[retargeters]",
17+
]
18+
19+
# `isaacteleop_examples` is a PEP 420 namespace shared by every example dist and
20+
# must stay without an __init__.py. `only-include` + `sources`, not `packages`:
21+
# the latter keeps only the last path component and would root the wheel at a
22+
# bare top-level `teleop/`.
23+
#
24+
# config/ lives inside the package: dex_bimanual_example and
25+
# full_bimanual_reordering_example resolve it from __file__.
26+
[tool.hatch.build.targets.wheel]
27+
only-include = ["python/isaacteleop_examples/teleop"]
28+
sources = ["python"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0

examples/teleop/python/config/dex_retargeting/README.md renamed to examples/teleop/python/isaacteleop_examples/teleop/config/dex_retargeting/README.md

File renamed without changes.

0 commit comments

Comments
 (0)