From 1265ff1dd2a17feb0b0f25a9596c26c7899a04a1 Mon Sep 17 00:00:00 2001 From: Ivan Yang Date: Tue, 27 Oct 2026 21:47:04 -0700 Subject: [PATCH 1/3] examples(vehicle_teleop): package under isaaccapture_examples Move the example to the layout in examples/README.md: pyproject.toml at the example root (dist isaaccapture-examples-vehicle-teleop), sources under python/isaaccapture_examples/vehicle_teleop/ with no __init__.py at the namespace level, hatchling only-include + sources, and relative sibling imports. - The scripts run python -m isaaccapture_examples.vehicle_teleop. and keep putting python/ on PYTHONPATH, so a venv set up before this change still works through them. - The README setup installs the example (uv sync without --no-install-project) from the example root and lists the module each script runs. - example_root() goes one level further up, so the default config/steering_wheel_config.yaml and steering_wheel_plugin paths resolve as before in the source and install trees. - CMake installs the example at examples/vehicle_teleop; README, config/ and scripts/ are still installed, since the scripts run from the install tree and the plugin default looks for /plugins there. - The worker tests stay in examples/vehicle_teleop/tests/ and import through the package; their pythonpath already points at python/. Part of NVIDIA/IsaacCapture#985. Signed-off-by: Ivan Yang --- examples/vehicle_teleop/.gitignore | 2 +- examples/vehicle_teleop/CMakeLists.txt | 2 +- examples/vehicle_teleop/README.md | 25 ++++++++++++++----- .../{python => }/pyproject.toml | 14 ++++++++++- .../vehicle_teleop/__init__.py | 0 .../vehicle_teleop/command_log.py | 2 +- .../isaac_keyboard_control_worker.py | 2 +- .../isaac_remote_steering_worker.py | 8 +++--- .../vehicle_teleop/panda_worker.py | 2 +- .../vehicle_teleop/replay_command_mcap.py | 2 +- .../vehicle_teleop/vehicle_command.py | 0 .../scripts/replay_command_mcap.sh | 2 +- .../run_isaac_keyboard_control_worker.sh | 2 +- .../run_isaac_remote_steering_worker.sh | 2 +- .../scripts/run_panda_worker.sh | 2 +- examples/vehicle_teleop/tests/test_workers.py | 6 ++--- 16 files changed, 50 insertions(+), 23 deletions(-) rename examples/vehicle_teleop/{python => }/pyproject.toml (53%) rename examples/vehicle_teleop/python/{ => isaaccapture_examples}/vehicle_teleop/__init__.py (100%) rename examples/vehicle_teleop/python/{ => isaaccapture_examples}/vehicle_teleop/command_log.py (98%) rename examples/vehicle_teleop/python/{ => isaaccapture_examples}/vehicle_teleop/isaac_keyboard_control_worker.py (99%) rename examples/vehicle_teleop/python/{ => isaaccapture_examples}/vehicle_teleop/isaac_remote_steering_worker.py (98%) rename examples/vehicle_teleop/python/{ => isaaccapture_examples}/vehicle_teleop/panda_worker.py (98%) rename examples/vehicle_teleop/python/{ => isaaccapture_examples}/vehicle_teleop/replay_command_mcap.py (96%) rename examples/vehicle_teleop/python/{ => isaaccapture_examples}/vehicle_teleop/vehicle_command.py (100%) diff --git a/examples/vehicle_teleop/.gitignore b/examples/vehicle_teleop/.gitignore index ba0bc20228..886f8da89a 100644 --- a/examples/vehicle_teleop/.gitignore +++ b/examples/vehicle_teleop/.gitignore @@ -1,3 +1,3 @@ logs/ thirdparty/ -python/.venv/ +.venv/ diff --git a/examples/vehicle_teleop/CMakeLists.txt b/examples/vehicle_teleop/CMakeLists.txt index 398f0ef253..988a183710 100644 --- a/examples/vehicle_teleop/CMakeLists.txt +++ b/examples/vehicle_teleop/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.20) include(${CMAKE_SOURCE_DIR}/cmake/InstallPythonExample.cmake) -install_python_example(DESTINATION examples/vehicle_teleop/python) +install_python_example(DESTINATION examples/vehicle_teleop) if(BUILD_TESTING AND BUILD_PYTHON_BINDINGS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") add_subdirectory(tests) diff --git a/examples/vehicle_teleop/README.md b/examples/vehicle_teleop/README.md index a836efdcf6..0c3c57cf8b 100644 --- a/examples/vehicle_teleop/README.md +++ b/examples/vehicle_teleop/README.md @@ -26,20 +26,31 @@ cmake --build build --parallel 4 cmake --install build ``` -Create the example virtual environment from this directory. The scripts use -`.venv/bin/python` directly, so keep the virtual environment at -`examples/vehicle_teleop/.venv`. +Create the example virtual environment from this directory, and install the +example into it. The scripts use `.venv/bin/python` directly, so keep the +virtual environment at `examples/vehicle_teleop/.venv`. ```bash cd examples/vehicle_teleop uv venv --python 3.11 .venv uv pip install --python .venv/bin/python --find-links ../../build/wheels "isaaccapture[cloudxr]" source .venv/bin/activate -cd python -uv sync --active --inexact --no-install-project --no-install-package isaaccapture -cd .. +uv sync --active --inexact --no-install-package isaaccapture ``` +The example has no single entry point. Each script in `scripts/` runs one module +with `.venv/bin/python -m`, so the modules can also be run directly: + +| Script | Module | +| --- | --- | +| `run_isaac_remote_steering_worker.sh` | `isaaccapture_examples.vehicle_teleop.isaac_remote_steering_worker --rate-hz 50` | +| `run_isaac_keyboard_control_worker.sh` | `isaaccapture_examples.vehicle_teleop.isaac_keyboard_control_worker --rate-hz 50` | +| `run_panda_worker.sh` | `isaaccapture_examples.vehicle_teleop.panda_worker` | +| `replay_command_mcap.sh` | `isaaccapture_examples.vehicle_teleop.replay_command_mcap` | + +`run_panda_worker.sh` also puts `thirdparty/opendbc` and `thirdparty/panda` on +`PYTHONPATH`; set that yourself when running the Panda worker module directly. + Clone the vehicle-side dependencies into this example's `thirdparty` directory. These repositories are intentionally not added as git submodules. ```bash @@ -126,3 +137,5 @@ If the steering worker cannot find the native plugin, pass `--plugin-binary` exp If the worker fails while creating the OpenXR session, confirm that the CloudXR runtime is running, the CloudXR environment has been sourced in the worker terminal, and the OpenXR client is connected. If the Panda worker cannot import `opendbc` or `panda`, confirm the two dependency repositories were cloned under `examples/vehicle_teleop/thirdparty/`. + +If `python -m` reports `No module named 'isaaccapture_examples'`, the example is not installed in that virtual environment. Rerun the `uv sync` step in [Setup](#setup). diff --git a/examples/vehicle_teleop/python/pyproject.toml b/examples/vehicle_teleop/pyproject.toml similarity index 53% rename from examples/vehicle_teleop/python/pyproject.toml rename to examples/vehicle_teleop/pyproject.toml index 681cf01d28..38443730b2 100644 --- a/examples/vehicle_teleop/python/pyproject.toml +++ b/examples/vehicle_teleop/pyproject.toml @@ -1,8 +1,14 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + [project] -name = "vehicle-teleop-example" +# The dist name mirrors the import path, so an installed example claims no bare +# top-level name in site-packages. +name = "isaaccapture-examples-vehicle-teleop" version = "0.0.0" description = "Isaac Teleop vehicle steering and Panda control example" requires-python = ">=3.11,<3.14" @@ -21,5 +27,11 @@ dependencies = [ "websockets>=14", ] +# `only-include` + `sources`, not `packages`, and no __init__.py above +# vehicle_teleop -- see the packaging rules in examples/README.md. +[tool.hatch.build.targets.wheel] +only-include = ["python/isaaccapture_examples/vehicle_teleop"] +sources = ["python"] + [[tool.uv.index]] url = "https://pypi.nvidia.com" diff --git a/examples/vehicle_teleop/python/vehicle_teleop/__init__.py b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/__init__.py similarity index 100% rename from examples/vehicle_teleop/python/vehicle_teleop/__init__.py rename to examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/__init__.py diff --git a/examples/vehicle_teleop/python/vehicle_teleop/command_log.py b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/command_log.py similarity index 98% rename from examples/vehicle_teleop/python/vehicle_teleop/command_log.py rename to examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/command_log.py index 1ae15747de..24e568285c 100644 --- a/examples/vehicle_teleop/python/vehicle_teleop/command_log.py +++ b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/command_log.py @@ -11,7 +11,7 @@ from mcap.reader import make_reader from mcap.writer import CompressionType, Writer -from vehicle_teleop.vehicle_command import VehicleControlCommand +from .vehicle_command import VehicleControlCommand @dataclass(frozen=True) diff --git a/examples/vehicle_teleop/python/vehicle_teleop/isaac_keyboard_control_worker.py b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/isaac_keyboard_control_worker.py similarity index 99% rename from examples/vehicle_teleop/python/vehicle_teleop/isaac_keyboard_control_worker.py rename to examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/isaac_keyboard_control_worker.py index 1d32091a5c..5269dbc850 100644 --- a/examples/vehicle_teleop/python/vehicle_teleop/isaac_keyboard_control_worker.py +++ b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/isaac_keyboard_control_worker.py @@ -19,7 +19,7 @@ ) from isaaccapture.schema import SteeringWheelOutput -from vehicle_teleop.vehicle_command import ( +from .vehicle_command import ( VehicleControlCommand, clamp, isaac_command_to_wire_command, diff --git a/examples/vehicle_teleop/python/vehicle_teleop/isaac_remote_steering_worker.py b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/isaac_remote_steering_worker.py similarity index 98% rename from examples/vehicle_teleop/python/vehicle_teleop/isaac_remote_steering_worker.py rename to examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/isaac_remote_steering_worker.py index daa24b48f4..98f56c5017 100644 --- a/examples/vehicle_teleop/python/vehicle_teleop/isaac_remote_steering_worker.py +++ b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/isaac_remote_steering_worker.py @@ -25,8 +25,8 @@ ) from isaaccapture.schema import SteeringWheelOutput -from vehicle_teleop.command_log import McapCommandLogger, SteeringWheelSample -from vehicle_teleop.vehicle_command import ( +from .command_log import McapCommandLogger, SteeringWheelSample +from .vehicle_command import ( VehicleControlCommand, isaac_command_to_wire_command, ) @@ -46,7 +46,9 @@ def example_root() -> Path: - return Path(__file__).resolve().parents[2] + # Four levels up is the example root, where config/ sits -- in the source + # tree and in the install tree alike. + return Path(__file__).resolve().parents[3] def default_config_path() -> Path: diff --git a/examples/vehicle_teleop/python/vehicle_teleop/panda_worker.py b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/panda_worker.py similarity index 98% rename from examples/vehicle_teleop/python/vehicle_teleop/panda_worker.py rename to examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/panda_worker.py index cbba828e0e..962338856d 100644 --- a/examples/vehicle_teleop/python/vehicle_teleop/panda_worker.py +++ b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/panda_worker.py @@ -11,7 +11,7 @@ import zmq -from vehicle_teleop.vehicle_command import VehicleControlCommand, clamp +from .vehicle_command import VehicleControlCommand, clamp DEFAULT_CONNECT = "tcp://127.0.0.1:5555" diff --git a/examples/vehicle_teleop/python/vehicle_teleop/replay_command_mcap.py b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/replay_command_mcap.py similarity index 96% rename from examples/vehicle_teleop/python/vehicle_teleop/replay_command_mcap.py rename to examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/replay_command_mcap.py index 5d401e63d3..cba1cd9a26 100644 --- a/examples/vehicle_teleop/python/vehicle_teleop/replay_command_mcap.py +++ b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/replay_command_mcap.py @@ -5,7 +5,7 @@ import argparse import time -from vehicle_teleop.command_log import McapCommandLogReader +from .command_log import McapCommandLogReader class CommandMcapReplay: diff --git a/examples/vehicle_teleop/python/vehicle_teleop/vehicle_command.py b/examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/vehicle_command.py similarity index 100% rename from examples/vehicle_teleop/python/vehicle_teleop/vehicle_command.py rename to examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/vehicle_command.py diff --git a/examples/vehicle_teleop/scripts/replay_command_mcap.sh b/examples/vehicle_teleop/scripts/replay_command_mcap.sh index 8706a85de4..41d411741f 100755 --- a/examples/vehicle_teleop/scripts/replay_command_mcap.sh +++ b/examples/vehicle_teleop/scripts/replay_command_mcap.sh @@ -14,5 +14,5 @@ fi export PYTHONPATH="${EXAMPLE_ROOT}/python${PYTHONPATH:+:${PYTHONPATH}}" -exec "${PYTHON}" -m vehicle_teleop.replay_command_mcap \ +exec "${PYTHON}" -m isaaccapture_examples.vehicle_teleop.replay_command_mcap \ "$@" diff --git a/examples/vehicle_teleop/scripts/run_isaac_keyboard_control_worker.sh b/examples/vehicle_teleop/scripts/run_isaac_keyboard_control_worker.sh index c7751d2d73..0aa601d4bd 100755 --- a/examples/vehicle_teleop/scripts/run_isaac_keyboard_control_worker.sh +++ b/examples/vehicle_teleop/scripts/run_isaac_keyboard_control_worker.sh @@ -14,6 +14,6 @@ fi export PYTHONPATH="${EXAMPLE_ROOT}/python${PYTHONPATH:+:${PYTHONPATH}}" -exec "${PYTHON}" -m vehicle_teleop.isaac_keyboard_control_worker \ +exec "${PYTHON}" -m isaaccapture_examples.vehicle_teleop.isaac_keyboard_control_worker \ --rate-hz 50 \ "$@" diff --git a/examples/vehicle_teleop/scripts/run_isaac_remote_steering_worker.sh b/examples/vehicle_teleop/scripts/run_isaac_remote_steering_worker.sh index d4f2ea2742..7a8cbab7b3 100755 --- a/examples/vehicle_teleop/scripts/run_isaac_remote_steering_worker.sh +++ b/examples/vehicle_teleop/scripts/run_isaac_remote_steering_worker.sh @@ -14,6 +14,6 @@ fi export PYTHONPATH="${EXAMPLE_ROOT}/python${PYTHONPATH:+:${PYTHONPATH}}" -exec "${PYTHON}" -m vehicle_teleop.isaac_remote_steering_worker \ +exec "${PYTHON}" -m isaaccapture_examples.vehicle_teleop.isaac_remote_steering_worker \ --rate-hz 50 \ "$@" diff --git a/examples/vehicle_teleop/scripts/run_panda_worker.sh b/examples/vehicle_teleop/scripts/run_panda_worker.sh index d6792c4c99..22a698d828 100755 --- a/examples/vehicle_teleop/scripts/run_panda_worker.sh +++ b/examples/vehicle_teleop/scripts/run_panda_worker.sh @@ -14,5 +14,5 @@ fi export PYTHONPATH="${EXAMPLE_ROOT}/python:${EXAMPLE_ROOT}/thirdparty/opendbc:${EXAMPLE_ROOT}/thirdparty/panda${PYTHONPATH:+:${PYTHONPATH}}" -exec "${PYTHON}" -m vehicle_teleop.panda_worker \ +exec "${PYTHON}" -m isaaccapture_examples.vehicle_teleop.panda_worker \ "$@" diff --git a/examples/vehicle_teleop/tests/test_workers.py b/examples/vehicle_teleop/tests/test_workers.py index 0442474d12..7802cd0ee1 100644 --- a/examples/vehicle_teleop/tests/test_workers.py +++ b/examples/vehicle_teleop/tests/test_workers.py @@ -13,16 +13,16 @@ VehicleControlRetargeterConfig, ) -from vehicle_teleop.isaac_keyboard_control_worker import ( +from isaaccapture_examples.vehicle_teleop.isaac_keyboard_control_worker import ( IsaacKeyboardControlState, IsaacKeyboardControlWorker, TerminalKeyReader, ) -from vehicle_teleop.isaac_remote_steering_worker import ( +from isaaccapture_examples.vehicle_teleop.isaac_remote_steering_worker import ( IsaacRemoteSteeringWorker, build_parser, ) -from vehicle_teleop.vehicle_command import VehicleControlCommand +from isaaccapture_examples.vehicle_teleop.vehicle_command import VehicleControlCommand @pytest.fixture From 1ce2a11b32d94af6208262adf166c927006b6078 Mon Sep 17 00:00:00 2001 From: Ivan Yang Date: Tue, 27 Oct 2026 23:22:11 -0700 Subject: [PATCH 2/3] examples(vehicle_teleop): keep tests off the example index, tidy README With pyproject.toml at the example root, uv run in tests/ picked up its [[tool.uv.index]] and queried pypi.nvidia.com first for every test dependency. An empty [tool.uv] in tests/pyproject.toml stops uv's settings lookup there, so the tests resolve from PyPI as before. README: - Move the direct python -m commands out of Setup into their own section after the thirdparty clone, as full commands: drop the --rate-hz 50 the workers already default to, and give the Panda worker its PYTHONPATH. - Say in Troubleshooting that a non-editable install must pass --config and --plugin-binary, since both defaults resolve relative to the example directory. Part of NVIDIA/IsaacCapture#985. Signed-off-by: Ivan Yang --- examples/vehicle_teleop/README.md | 30 +++++++++++--------- examples/vehicle_teleop/tests/pyproject.toml | 4 +++ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/examples/vehicle_teleop/README.md b/examples/vehicle_teleop/README.md index 0c3c57cf8b..1daebb6d31 100644 --- a/examples/vehicle_teleop/README.md +++ b/examples/vehicle_teleop/README.md @@ -38,19 +38,6 @@ source .venv/bin/activate uv sync --active --inexact --no-install-package isaaccapture ``` -The example has no single entry point. Each script in `scripts/` runs one module -with `.venv/bin/python -m`, so the modules can also be run directly: - -| Script | Module | -| --- | --- | -| `run_isaac_remote_steering_worker.sh` | `isaaccapture_examples.vehicle_teleop.isaac_remote_steering_worker --rate-hz 50` | -| `run_isaac_keyboard_control_worker.sh` | `isaaccapture_examples.vehicle_teleop.isaac_keyboard_control_worker --rate-hz 50` | -| `run_panda_worker.sh` | `isaaccapture_examples.vehicle_teleop.panda_worker` | -| `replay_command_mcap.sh` | `isaaccapture_examples.vehicle_teleop.replay_command_mcap` | - -`run_panda_worker.sh` also puts `thirdparty/opendbc` and `thirdparty/panda` on -`PYTHONPATH`; set that yourself when running the Panda worker module directly. - Clone the vehicle-side dependencies into this example's `thirdparty` directory. These repositories are intentionally not added as git submodules. ```bash @@ -130,10 +117,27 @@ If the remote worker was started with `--log-mcap`, replay the recorded commands The replay command prints the retargeted vehicle command values. It does not write to PandaRunner. +## Running the Modules Directly + +The example has no single entry point: each script in `scripts/` runs one module +with `.venv/bin/python -m`. To run a module yourself, from this directory: + +```bash +.venv/bin/python -m isaaccapture_examples.vehicle_teleop.isaac_remote_steering_worker +.venv/bin/python -m isaaccapture_examples.vehicle_teleop.isaac_keyboard_control_worker +PYTHONPATH=thirdparty/opendbc:thirdparty/panda .venv/bin/python -m isaaccapture_examples.vehicle_teleop.panda_worker --connect "tcp://:5555" +.venv/bin/python -m isaaccapture_examples.vehicle_teleop.replay_command_mcap logs/vehicle_control.mcap +``` + +The Panda worker needs `thirdparty/opendbc` and `thirdparty/panda` on +`PYTHONPATH`; `run_panda_worker.sh` sets that for you. + ## Troubleshooting If the steering worker cannot find the native plugin, pass `--plugin-binary` explicitly. In a source build, the default location is usually `build/src/plugins/steering_wheel/steering_wheel_plugin`. In an install tree, it is usually `plugins/steering_wheel/steering_wheel_plugin`. +The default `--config` and `--plugin-binary` are found relative to this example directory, so they resolve in a source checkout set up as in [Setup](#setup) and in an install tree. If you installed the example as a regular, non-editable package, pass both explicitly, with `--config` pointing at this directory's `config/steering_wheel_config.yaml`. + If the worker fails while creating the OpenXR session, confirm that the CloudXR runtime is running, the CloudXR environment has been sourced in the worker terminal, and the OpenXR client is connected. If the Panda worker cannot import `opendbc` or `panda`, confirm the two dependency repositories were cloned under `examples/vehicle_teleop/thirdparty/`. diff --git a/examples/vehicle_teleop/tests/pyproject.toml b/examples/vehicle_teleop/tests/pyproject.toml index 9c8ee9000f..b87fd3f194 100644 --- a/examples/vehicle_teleop/tests/pyproject.toml +++ b/examples/vehicle_teleop/tests/pyproject.toml @@ -11,3 +11,7 @@ dev = ["pytest", "numpy", "mcap>=1.2.0", "pyyaml", "pyzmq"] [tool.pytest.ini_options] pythonpath = ["../python"] + +# uv reads settings from the nearest [tool.uv], so this empty table keeps the +# example's pypi.nvidia.com index one directory up out of the test run. +[tool.uv] From c8317fad704e477baef606ad7f7cad6c326a98fc Mon Sep 17 00:00:00 2001 From: Ivan Yang Date: Wed, 28 Oct 2026 12:09:00 -0700 Subject: [PATCH 3/3] examples(vehicle_teleop): install the local isaaccapture build the canonical way The Setup block installed isaaccapture unpinned from build/wheels. With no wheel there for the venv's Python, that silently resolved a published isaaccapture instead of failing, and after a rebuild rerunning it left the old wheel installed. - Use the install from Build from source step 4: a venv on the build's Python with --seed, isaaccapture[cloudxr]==X.Y+local from install/wheels/ (what the README's cmake --install step produces) with --reinstall-package isaaccapture, then uv pip install -e . for the example instead of uv sync, which locked isaaccapture against the index. - Say that the venv stays in this directory because the scripts call .venv/bin/python, and to rerun the isaaccapture line after every rebuild. - The scripts' missing-venv hint points at the README's Setup instead of a hard-coded uv venv --python 3.11 command. Part of NVIDIA/IsaacCapture#985. Signed-off-by: Ivan Yang --- examples/vehicle_teleop/README.md | 20 ++++++++++++------- .../scripts/replay_command_mcap.sh | 2 +- .../run_isaac_keyboard_control_worker.sh | 2 +- .../run_isaac_remote_steering_worker.sh | 2 +- .../scripts/run_panda_worker.sh | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/examples/vehicle_teleop/README.md b/examples/vehicle_teleop/README.md index 1daebb6d31..ca440fdc9e 100644 --- a/examples/vehicle_teleop/README.md +++ b/examples/vehicle_teleop/README.md @@ -26,18 +26,24 @@ cmake --build build --parallel 4 cmake --install build ``` -Create the example virtual environment from this directory, and install the -example into it. The scripts use `.venv/bin/python` directly, so keep the -virtual environment at `examples/vehicle_teleop/.venv`. +Create the example virtual environment in this directory, install the +`isaaccapture` build into it, then install the example: ```bash cd examples/vehicle_teleop -uv venv --python 3.11 .venv -uv pip install --python .venv/bin/python --find-links ../../build/wheels "isaaccapture[cloudxr]" +# Replace 3.11 with your ISAAC_TELEOP_PYTHON_VERSION and X.Y with the first two numbers of VERSION. +uv venv --python 3.11 --seed .venv source .venv/bin/activate -uv sync --active --inexact --no-install-package isaaccapture +uv pip install "isaaccapture[cloudxr]==X.Y+local" --find-links=../../install/wheels/ --reinstall-package isaaccapture +uv pip install -e . ``` +This is the install from [step 4 of Build from source](https://nvidia.github.io/IsaacCapture/main/development/build_from_source/index.html#install-the-isaaccapture-pip-package), +which [Running an example](../README.md#running-an-example) also uses, except +that the venv lives in this directory because the scripts call +`.venv/bin/python`. Rerun the `isaaccapture` line after every rebuild to replace +the installed wheel. + Clone the vehicle-side dependencies into this example's `thirdparty` directory. These repositories are intentionally not added as git submodules. ```bash @@ -142,4 +148,4 @@ If the worker fails while creating the OpenXR session, confirm that the CloudXR If the Panda worker cannot import `opendbc` or `panda`, confirm the two dependency repositories were cloned under `examples/vehicle_teleop/thirdparty/`. -If `python -m` reports `No module named 'isaaccapture_examples'`, the example is not installed in that virtual environment. Rerun the `uv sync` step in [Setup](#setup). +If `python -m` reports `No module named 'isaaccapture_examples'`, the example is not installed in that virtual environment. Rerun `uv pip install -e .` from [Setup](#setup). diff --git a/examples/vehicle_teleop/scripts/replay_command_mcap.sh b/examples/vehicle_teleop/scripts/replay_command_mcap.sh index 41d411741f..84bb0c5437 100755 --- a/examples/vehicle_teleop/scripts/replay_command_mcap.sh +++ b/examples/vehicle_teleop/scripts/replay_command_mcap.sh @@ -8,7 +8,7 @@ PYTHON="${EXAMPLE_ROOT}/.venv/bin/python" if [[ ! -x "${PYTHON}" ]]; then echo "Missing example virtual environment: ${EXAMPLE_ROOT}/.venv" >&2 - echo "Create it with: uv venv --python 3.11 .venv" >&2 + echo "Set it up as in Setup in ${EXAMPLE_ROOT}/README.md" >&2 exit 1 fi diff --git a/examples/vehicle_teleop/scripts/run_isaac_keyboard_control_worker.sh b/examples/vehicle_teleop/scripts/run_isaac_keyboard_control_worker.sh index 0aa601d4bd..973d56e4d6 100755 --- a/examples/vehicle_teleop/scripts/run_isaac_keyboard_control_worker.sh +++ b/examples/vehicle_teleop/scripts/run_isaac_keyboard_control_worker.sh @@ -8,7 +8,7 @@ PYTHON="${EXAMPLE_ROOT}/.venv/bin/python" if [[ ! -x "${PYTHON}" ]]; then echo "Missing example virtual environment: ${EXAMPLE_ROOT}/.venv" >&2 - echo "Create it with: uv venv --python 3.11 .venv" >&2 + echo "Set it up as in Setup in ${EXAMPLE_ROOT}/README.md" >&2 exit 1 fi diff --git a/examples/vehicle_teleop/scripts/run_isaac_remote_steering_worker.sh b/examples/vehicle_teleop/scripts/run_isaac_remote_steering_worker.sh index 7a8cbab7b3..b118096c16 100755 --- a/examples/vehicle_teleop/scripts/run_isaac_remote_steering_worker.sh +++ b/examples/vehicle_teleop/scripts/run_isaac_remote_steering_worker.sh @@ -8,7 +8,7 @@ PYTHON="${EXAMPLE_ROOT}/.venv/bin/python" if [[ ! -x "${PYTHON}" ]]; then echo "Missing example virtual environment: ${EXAMPLE_ROOT}/.venv" >&2 - echo "Create it with: uv venv --python 3.11 .venv" >&2 + echo "Set it up as in Setup in ${EXAMPLE_ROOT}/README.md" >&2 exit 1 fi diff --git a/examples/vehicle_teleop/scripts/run_panda_worker.sh b/examples/vehicle_teleop/scripts/run_panda_worker.sh index 22a698d828..02f42c7c44 100755 --- a/examples/vehicle_teleop/scripts/run_panda_worker.sh +++ b/examples/vehicle_teleop/scripts/run_panda_worker.sh @@ -8,7 +8,7 @@ PYTHON="${EXAMPLE_ROOT}/.venv/bin/python" if [[ ! -x "${PYTHON}" ]]; then echo "Missing example virtual environment: ${EXAMPLE_ROOT}/.venv" >&2 - echo "Create it with: uv venv --python 3.11 .venv" >&2 + echo "Set it up as in Setup in ${EXAMPLE_ROOT}/README.md" >&2 exit 1 fi