Skip to content

examples(teleop_ros2): package under isaacteleop_examples - #1039

Open
jiwenc-nv wants to merge 1 commit into
jiwenc-nv/examples-mcap-record-replayfrom
jiwenc-nv/examples-teleop-ros2
Open

examples(teleop_ros2): package under isaacteleop_examples#1039
jiwenc-nv wants to merge 1 commit into
jiwenc-nv/examples-mcap-record-replayfrom
jiwenc-nv/examples-teleop-ros2

Conversation

@jiwenc-nv

@jiwenc-nv jiwenc-nv commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Part of #985. Stacked on #1038.

Fifteen modules imported their siblings as top-level modules — constants, messages, geometry, assets, session_config and the rest — which resolved only because the invoked script's own directory landed on sys.path. That broke under python -m, broke when copied into another project, and claimed an unusually generic set of names. This moves the tree to the layout in examples/README.md.

Two workarounds propping this up are deleted, which is the evidence the packaging is real rather than relocated:

  • pythonpath = ["."] in the pyproject
  • the example source directory on the ctest PYTHONPATH

The tests reach the in-tree source through a conftest.py instead, mirroring mujoco_xr's, so a bare pytest in that directory works for the first time. Six test import lines change; no assertion does.

The node keeps its filename and gains a __main__.py, so the container entry point becomes python -m isaacteleop_examples.teleop_ros2 and still forwards --ros-args. The install tree drops a level, so the Dockerfile WORKDIR follows, as do the three invocations in build-ubuntu.yml.

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

Testing

x86_64 / Ubuntu, Python 3.12. Wheel ships 15 modules under isaacteleop_examples/teleop_ros2/ with no namespace __init__.py. Editable-installed into a clean venv, the ROS-free modules (constants, tensor_group_helpers) import with the CWD outside the repo; import constants fails, so the flat names are gone rather than relocated. The new conftest.py was checked to resolve to examples/teleop_ros2/python with the package present and no namespace __init__.py. All test files compile. pre-commit clean.

Not run: ctest -L teleop_ros2 — no ROS 2 on this host, so geometry_msgs and rclpy are unavailable. That suite and the container entry point are what CI should be trusted for here; please treat the CI run as the gate rather than my local checks.

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

No new tests: this is a move. The existing suite is the check — it exercises every moved module and passes with only its import lines changed.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2446ad5b-c732-45ab-8f8f-c81ee1a7e31e

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

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

@jiwenc-nv
jiwenc-nv requested a review from sgrizan-nv August 28, 2026 04:59
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-teleop-ros2 branch from 9b577b0 to 008c2a4 Compare August 28, 2026 05:00
@jiwenc-nv
jiwenc-nv changed the base branch from jiwenc-nv/examples-deviceio-live-view to jiwenc-nv/examples-mcap-record-replay August 28, 2026 05:01
@jiwenc-nv
jiwenc-nv requested a review from ivany-nv August 28, 2026 05:11
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-teleop-ros2 branch from 008c2a4 to b71f0e1 Compare August 28, 2026 05:22
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-teleop-ros2 branch from b71f0e1 to a212d0a Compare August 28, 2026 05:32
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-teleop-ros2 branch from a212d0a to 56ba82a Compare August 28, 2026 05:44
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-teleop-ros2 branch 2 times, most recently from ae449ca to 8d2a267 Compare August 28, 2026 14:46
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-teleop-ros2 branch from 8d2a267 to d5b5fee Compare August 28, 2026 16:10
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-teleop-ros2 branch 2 times, most recently from 1d6e024 to 9c120d4 Compare August 29, 2026 00:21
Fifteen modules imported their siblings as top-level modules -- constants,
messages, geometry, assets, session_config and the rest -- which resolved only
because the invoked script's own directory landed on sys.path. That broke under
`python -m`, broke when copied into another project, and claimed a set of
unusually generic names. Move the tree to the layout in examples/README.md.

Two workarounds propping this up are now gone, which is the evidence the
packaging is real rather than relocated: `pythonpath = ["."]` in the pyproject,
and the example source directory on the ctest PYTHONPATH. The tests reach the
in-tree source through a conftest.py instead, mirroring mujoco_xr's, so a bare
`pytest` in that directory works for the first time.

The node keeps its filename and gains a __main__.py, so the container entry
point becomes `python -m isaacteleop_examples.teleop_ros2` and still forwards
--ros-args. The install tree drops a level, so the Dockerfile WORKDIR follows.

Part of #985.

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-teleop-ros2 branch from 9c120d4 to 24146a4 Compare August 29, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants