Skip to content

Commit f9ff279

Browse files
committed
examples(teleop_session_manager): package under isaacteleop_examples
teleop_controls_simple_example.py imported its helper as a top-level module, which resolved only because the invoked script's own directory landed on sys.path -- so it broke under `python -m`, broke when copied into another project, and claimed the bare name `teleop_controls_simple_helper`. Move the tree to the layout in examples/README.md. The four demos here are co-equal, so there is no __main__.py to pick: each is its own submodule and the README lists them. Inventing a default would have made one of the four look privileged. The README moves up beside the pyproject and now documents all four, rather than only teleop_session_example. Part of #985. Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
1 parent e9b6e9b commit f9ff279

12 files changed

Lines changed: 60 additions & 58 deletions

File tree

docs/source/getting_started/teleop_control_state_machine.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Connecting Inputs
6969
-----------------
7070

7171
Use one debounced selector per signal (simple wiring, no multi-input lambdas):
72-
see :code-file:`teleop_controls_simple_example.py <examples/teleop_session_manager/python/teleop_controls_simple_example.py>`
72+
see :code-file:`teleop_controls_simple_example.py <examples/teleop_session_manager/python/isaacteleop_examples/teleop_session_manager/teleop_controls_simple_example.py>`
7373
for the full runnable setup.
7474

7575
.. code-block:: python
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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

66
include(${CMAKE_SOURCE_DIR}/cmake/InstallPythonExample.cmake)
7-
install_python_example(DESTINATION examples/teleop_session_manager/python)
7+
install_python_example(DESTINATION examples/teleop_session_manager)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
SPDX-License-Identifier: Apache-2.0
4+
-->
5+
6+
# TeleopSessionManager examples
7+
8+
Four standalone demos of the `TeleopSession` API. Install once, then run
9+
whichever one you want:
10+
11+
```bash
12+
uv pip install -e ./examples/teleop_session_manager
13+
python -m isaacteleop_examples.teleop_session_manager.teleop_session_example
14+
```
15+
16+
| Module | What it shows |
17+
| --- | --- |
18+
| `teleop_session_example` | Velocity from hand-wrist and controller motion, driven by `session.step()` with the synthetic hands plugin |
19+
| `teleop_controls_simple_example` | The simplified controls helper, with the state machine in `teleop_controls_simple_helper` |
20+
| `external_inputs_example` | Feeding a session from an input source outside DeviceIO |
21+
| `message_channel_example` | Sending and receiving on a session message channel |
22+
23+
## See also
24+
25+
- Module docs: `docs/source/references/teleop_session.rst`
26+
- Retargeting engine: `src/core/retargeting_engine/`
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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-session-manager"
12+
version = "0.0.0" # Internal examples - not versioned
13+
description = "TeleopUtils Python Examples"
14+
requires-python = ">=3.11,<3.14"
15+
dependencies = [
16+
"isaacteleop[ui]",
17+
"numpy>=1.23.0",
18+
]
19+
20+
# `isaacteleop_examples` is a PEP 420 namespace shared by every example dist and
21+
# must stay without an __init__.py. `only-include` + `sources`, not `packages`:
22+
# the latter keeps only the last path component and would root the wheel at a
23+
# bare top-level `teleop_session_manager/`.
24+
[tool.hatch.build.targets.wheel]
25+
only-include = ["python/isaacteleop_examples/teleop_session_manager"]
26+
sources = ["python"]

examples/teleop_session_manager/python/README.md

Lines changed: 0 additions & 40 deletions
This file was deleted.
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_session_manager/python/external_inputs_example.py renamed to examples/teleop_session_manager/python/isaacteleop_examples/teleop_session_manager/external_inputs_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
"""

examples/teleop_session_manager/python/message_channel_example.py renamed to examples/teleop_session_manager/python/isaacteleop_examples/teleop_session_manager/message_channel_example.py

File renamed without changes.

examples/teleop_session_manager/python/teleop_controls_simple_example.py renamed to examples/teleop_session_manager/python/isaacteleop_examples/teleop_session_manager/teleop_controls_simple_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
DefaultTeleopStateManager,
3939
)
4040

41-
from teleop_controls_simple_helper import (
41+
from .teleop_controls_simple_helper import (
4242
build_observation_pipeline,
4343
print_frame,
4444
print_header,

examples/teleop_session_manager/python/teleop_controls_simple_helper.py renamed to examples/teleop_session_manager/python/isaacteleop_examples/teleop_session_manager/teleop_controls_simple_helper.py

File renamed without changes.

0 commit comments

Comments
 (0)