Skip to content

examples(vehicle_teleop): package under isaaccapture_examples - #1375

Merged
ivany-nv merged 4 commits into
mainfrom
ivany-nv/examples-vehicle-teleop
Oct 28, 2026
Merged

ivany-nv merged 4 commits into
mainfrom
ivany-nv/examples-vehicle-teleop

Conversation

@ivany-nv

@ivany-nv ivany-nv commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part of #985.

vehicle_teleop moves 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/ (a PEP 420 namespace with no __init__.py at that level), hatchling only-include + sources, and relative sibling imports. The example has four co-equal entry points, so it has no __main__.py; the README gives the direct python -m command for each module, with the PYTHONPATH the Panda worker needs.

The scripts keep their names and arguments. They now run python -m isaaccapture_examples.vehicle_teleop.<module> and still put python/ on PYTHONPATH, so a .venv set up before this change keeps working through them. Direct module invocations change:

# before (from examples/vehicle_teleop, with PYTHONPATH=python)
.venv/bin/python -m vehicle_teleop.isaac_remote_steering_worker --rate-hz 50
.venv/bin/python -m vehicle_teleop.isaac_keyboard_control_worker --rate-hz 50
.venv/bin/python -m vehicle_teleop.panda_worker --connect "tcp://<remote-ip>:5555"
.venv/bin/python -m vehicle_teleop.replay_command_mcap logs/vehicle_control.mcap

# after (from examples/vehicle_teleop, once setup has installed the example)
.venv/bin/python -m isaaccapture_examples.vehicle_teleop.isaac_remote_steering_worker --rate-hz 50
.venv/bin/python -m isaaccapture_examples.vehicle_teleop.isaac_keyboard_control_worker --rate-hz 50
.venv/bin/python -m isaaccapture_examples.vehicle_teleop.panda_worker --connect "tcp://<remote-ip>:5555"
.venv/bin/python -m isaaccapture_examples.vehicle_teleop.replay_command_mcap logs/vehicle_control.mcap

The README setup now uses the local-build install from step 4 of Build from source, keeping the venv in the example directory because the scripts call .venv/bin/python. It pins isaaccapture to the local build and reinstalls it after a rebuild, then installs the example editable. The old unpinned line silently resolved a published isaaccapture when there was no wheel for the venv's Python, and rerunning it after a rebuild kept the old build. The scripts' missing-venv hint now points at the README's Setup instead of uv venv --python 3.11 .venv.

# before (from 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 ..

# after (from examples/vehicle_teleop; 3.11 is ISAAC_TELEOP_PYTHON_VERSION, X.Y the first two numbers of VERSION)
uv venv --python 3.11 --seed .venv
source .venv/bin/activate
uv pip install "isaaccapture[cloudxr]==X.Y+local" --find-links=../../install/wheels/ --reinstall-package isaaccapture
uv pip install -e .

Behaviour is otherwise unchanged:

  • example_root() goes one level further up, so the default --config (config/steering_wheel_config.yaml) and --plugin-binary (build/src/plugins/... in a checkout, <prefix>/plugins/... in an install tree) resolve to the same files as before. Both defaults are relative to the example's tree, so a plain wheel install of the example needs both flags passed explicitly. The README's Troubleshooting says so.
  • The MCAP schema name vehicle_teleop.VehicleControlCommandRecord is unchanged, so logs recorded before this change still replay.
  • The worker tests stay in examples/vehicle_teleop/tests/, where tests/AGENTS.md puts them, and import through the package. Their pythonpath = ["../python"] already points at the namespace root, and their CMakeLists.txt is unchanged. tests/pyproject.toml gains an empty [tool.uv]: with the example's pyproject.toml now one directory up, uv would otherwise take its settings from there and try pypi.nvidia.com first for every test dependency.

CMake install, kept. install_python_example() now takes DESTINATION examples/vehicle_teleop, which keeps python/ and puts pyproject.toml at <prefix>/examples/vehicle_teleop/. The README, config/ and scripts/ are still installed: the scripts run from the install tree (they find .venv and python/ next to themselves), and the steering worker's plugin default looks for <prefix>/plugins/steering_wheel/steering_wheel_plugin relative to it. This matches teleop_ros2, which installs its configs/ beside its packaged sources and finds them the same way.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Breaks direct python -m vehicle_teleop.<module> invocations (migration above). The scripts, their arguments, the config, the install-tree layout of README/config/scripts and the isaaccapture library are unchanged.

Testing

x86_64 / Ubuntu 24.04, Python 3.12, against a local isaaccapture 1.7 build of this branch.

  • SKIP=check-copyright-year pre-commit run --all-files passes.
  • ctest -R vehicle_teleop_test_workers from a build of this branch configured with BUILD_TESTING=ON: 15 passed.
  • uv build --wheel examples/vehicle_teleop: every file sits under isaaccapture_examples/vehicle_teleop/, and the wheel has no isaaccapture_examples/__init__.py.
  • Source tree, following the README's Setup block in a clean shell (env -i, no profile) with 3.12 and 1.7 filled in: isaaccapture 1.7+local installs from install/wheels/ and uv pip install -e . adds the example without touching it. All four scripts run with --help, and python -m isaaccapture_examples.vehicle_teleop.<module> --help works for all four modules from / with no PYTHONPATH. --config and --plugin-binary default to examples/vehicle_teleop/config/steering_wheel_config.yaml and build/src/plugins/steering_wheel/steering_wheel_plugin, as on main.
  • Install tree (cmake --install to a scratch prefix): a .venv set up there from the generated pyproject.toml (isaaccapture[cloudxr]==1.7+local, find-links = ["../../wheels"]) runs all four scripts with --help, and the defaults resolve to <prefix>/examples/vehicle_teleop/config/steering_wheel_config.yaml and <prefix>/plugins/steering_wheel/steering_wheel_plugin.
  • Rebuild: the venv held a build without fix(cloudxr): require websockets 17.3 for quiet handshake failures #1353 (websockets>=14.0). After rebuilding at the branch head and cmake --install build, rerunning the install line without --reinstall-package left that build in place ("Checked 1 package"). The README's line replaced it: websockets>=17.3, and cloudxr/wss.py matches the branch's source. The example stayed installed and its four modules still ran from /.
  • Wrong Python: in a 3.11 venv against the cp312 build, the README's pinned line fails with "only found wheels for isaaccapture (v1.7+local) with ... cp312". The old unpinned line resolves the published isaaccapture==1.7.79a1 without an error.
  • The scripts pass bash -n; with no .venv, they print the README path to set it up.
  • Wheel install in a fresh venv: all four modules run with --help from /.
  • Without hardware: an MCAP written by McapCommandLogger replays through replay_command_mcap.sh, with and without --realtime, and run_panda_worker.sh --dry-run prints the commands a local ZMQ publisher sends in the workers' wire format.
  • References outside the example, at the branch head: git grep over all of docs/ (pages, _data/*.yaml, toctrees), every README and AGENTS.md, src/, tests/, scripts/, .github/, deps/, cmake/, .pre-commit-config.yaml and examples/, for vehicle_teleop, each module name, each launcher script, steering_wheel_config, the MCAP schema name, examples/vehicle_teleop/python and the old --no-install-project setup. No docs page mentions the example; the live site's search index for main agrees, so this PR has no docs preview to check (the docs build runs only for docs/** changes). The remaining hits name paths this PR does not move, so they stay: the flow-diagram SVG exclude in .pre-commit-config.yaml, the examples/vehicle_teleop/tests/ line in tests/AGENTS.md, add_subdirectory(vehicle_teleop) in examples/CMakeLists.txt, and config/steering_wheel_config.yaml in src/plugins/steering_wheel/README.md.
  • tests/: uv lock -v reads its settings from tests/pyproject.toml and makes no pypi.nvidia.com request; without the empty [tool.uv] it reads examples/vehicle_teleop/pyproject.toml and queries that index first. The worker tests pass the way CTest runs them (uv run --extra dev pytest, 15 passed).
  • README: after its setup, the four commands under "Running the Modules Directly" run with --help. In a non-editable install the default --config points inside the venv, and an explicit --config config/steering_wheel_config.yaml loads the shipped mapping.

Not covered yet: runs that need a steering wheel, Isaac Sim, a headset or a Panda.

  • ./scripts/run_isaac_remote_steering_worker.sh --verbose with a G920/G923 on /dev/input/js0, CloudXR running and a client connected; the default config and plugin binary resolve from the checkout.
  • The same from the install tree (<prefix>/examples/vehicle_teleop), where the plugin default is <prefix>/plugins/steering_wheel/steering_wheel_plugin.
  • ./scripts/run_isaac_keyboard_control_worker.sh --verbose driving the vehicle in Isaac Sim.
  • ./scripts/run_panda_worker.sh --connect "tcp://<remote-ip>:5555" on the vehicle machine with a Panda, thirdparty/opendbc and thirdparty/panda cloned.
  • ./scripts/replay_command_mcap.sh on a log recorded with --log-mcap before this change.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the linter and formatter with SKIP=check-copyright-year pre-commit run --all-files
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix/feature works (or explained why not)
  • I have signed off all my commits (git commit -s) per the DCO

Summary by CodeRabbit

  • Improvements
    • Vehicle teleoperation example setup now uses a virtual environment in the example directory, with updated setup and troubleshooting guidance.
    • Updated worker and replay scripts to run from the example’s installed package.
    • Direct Panda worker runs may require the OpenDBC and Panda directories on PYTHONPATH.

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.<module>
  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 <prefix>/plugins there.
- The worker tests stay in examples/vehicle_teleop/tests/ and import
  through the package; their pythonpath already points at python/.

Part of #985.

Signed-off-by: Ivan Yang <yifanyang@nvidia.com>
@ivany-nv ivany-nv self-assigned this Oct 28, 2026
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 20c9be5 and 1265ff1.

Files selected for processing: 16
  • examples/vehicle_teleop/.gitignore
  • examples/vehicle_teleop/CMakeLists.txt
  • examples/vehicle_teleop/README.md
  • examples/vehicle_teleop/pyproject.toml
  • examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/__init__.py
  • examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/command_log.py
  • examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/isaac_keyboard_control_worker.py
  • examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/isaac_remote_steering_worker.py
  • examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/panda_worker.py
  • examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/replay_command_mcap.py
  • examples/vehicle_teleop/python/isaaccapture_examples/vehicle_teleop/vehicle_command.py
  • examples/vehicle_teleop/scripts/replay_command_mcap.sh
  • examples/vehicle_teleop/scripts/run_isaac_keyboard_control_worker.sh
  • examples/vehicle_teleop/scripts/run_isaac_remote_steering_worker.sh
  • examples/vehicle_teleop/scripts/run_panda_worker.sh
  • examples/vehicle_teleop/tests/test_workers.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.

Walkthrough

The vehicle teleop example now uses the isaaccapture_examples.vehicle_teleop package layout. Project metadata and installation instructions configure the example as a Hatchling-built package. Internal imports, shell-script module paths, and test imports now use the package namespace. The README also documents script entry points, Panda worker environment requirements, and setup troubleshooting.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

Merge Risk: Minimal · previous review 1265f

The package migration is ready to merge; no material setup, launch, or runtime risk is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: moving the vehicle teleoperation example under the isaaccapture_examples package.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 10 files. (4 skipped: 4 unsupported.)

Finishing Touches: 💡 2
⚔️ Resolve merge conflicts: 💡
  • Resolve merge conflict in branch ivany-nv/examples-vehicle-teleop
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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 #985.

Signed-off-by: Ivan Yang <yifanyang@nvidia.com>
Signed-off-by: Ivan Yang <yifanyang@nvidia.com>
…nonical 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 #985.

Signed-off-by: Ivan Yang <yifanyang@nvidia.com>
@ivany-nv
ivany-nv merged commit 61cece3 into main Oct 28, 2026
37 checks passed
@ivany-nv
ivany-nv deleted the ivany-nv/examples-vehicle-teleop branch October 28, 2026 20:33
ivany-nv added a commit that referenced this pull request Oct 28, 2026
Both READMEs gained an inline `uv venv` line in #1372 and #1375. uv refuses
an existing .venv without --clear, so say to skip the line when .venv already
runs that Python, as noitom and oglo_tactile do.

Signed-off-by: Ivan Yang <yifanyang@nvidia.com>

This branch was successfully deployed

1 active deployment
dev — c8317fad Deployed Oct 28, 2026 by ivany-nv via publish-wheel #6158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants