examples(teleop_ros2): package under isaacteleop_examples - #1039
examples(teleop_ros2): package under isaacteleop_examples#1039jiwenc-nv wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
9b577b0 to
008c2a4
Compare
008c2a4 to
b71f0e1
Compare
b71f0e1 to
a212d0a
Compare
a212d0a to
56ba82a
Compare
ae449ca to
8d2a267
Compare
8d2a267 to
d5b5fee
Compare
1d6e024 to
9c120d4
Compare
24146a4 to
bc00f31
Compare
cfef590 to
17ca7d8
Compare
17ca7d8 to
31f589b
Compare
Nine modules imported `common` as a top-level module, which resolved only because the invoked script's own directory landed on sys.path -- so they broke under `python -m`, broke when copied into another project, and claimed the very generic bare name `common`. Move the tree to the layout in examples/README.md. Twelve co-equal scripts, so no __main__.py; the README maps channel to live/record/replay. Behaviour change forced by the move: recordings default to ./recordings/ relative to the working directory rather than a path derived from __file__, which after the move points inside the package and for an installed copy would have written into site-packages. Replay searches the same directory. Three deliberate viewer fixes. The seven viser viewers bind 0.0.0.0 rather than 127.0.0.1, since they run where the hardware is and get opened from a laptop; --host 127.0.0.1 restores it. Each startup line reports the bind instead of always printing "localhost". And the grid lay in viser's default XY plane, which stands up as a wall once the up direction is +y: it is now an xz ground plane with the camera centred on it, as one helper in common.py rather than seven copies. Part of #985. Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
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>
31f589b to
774a9f0
Compare
|
A heads-up about this PR's base rather than its own content: the branch is still This head ( So the three commits #1038 picked up on 2026-09-08 are absent here:
Checkable on the two heads: $ git show 774a9f0f4:examples/mcap_record_replay/python/isaacteleop_examples/mcap_record_replay/replay_full_body.py | sed -n 66p
candidates = list(recordings.glob("*.mcap"))
$ git show 887db467f:examples/mcap_record_replay/python/isaacteleop_examples/mcap_record_replay/replay_full_body.py | sed -n 66p
candidates = list(recordings.glob("full_body_*.mcap")) or list(
$ git show 774a9f0f4:.gitignore | grep -c '^/recordings/'
0Two consequences:
A rebase of #1039..#1047 onto the current #1038 head would clear both. I held |
|
Verdict: a rebase onto #1038's current head looks unavoidable. #1038 was rebased after this stack branched, and both merge orders now conflict on the same three files — including on the very fix #1038 added, where a careless resolution would quietly undo it. Concrete evidence for the baseline point raised earlier. The stack's Both merge orders conflict, on the same three files (
So sequencing alone will not avoid it. The part worth flagging: the conflict sits on the fix itself — a merged file holds both |
Description
Part of #985. Stacked on #1038.
Fifteen modules imported their siblings as top-level modules —
constants,messages,geometry,assets,session_configand the rest — which resolved only because the invoked script's own directory landed onsys.path. That broke underpython -m, broke when copied into another project, and claimed an unusually generic set of names. This moves the tree to the layout inexamples/README.md.Two workarounds propping this up are deleted, which is the evidence the packaging is real rather than relocated:
pythonpath = ["."]in the pyprojectPYTHONPATHThe tests reach the in-tree source through a
conftest.pyinstead, mirroringmujoco_xr's, so a barepytestin 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 becomespython -m isaacteleop_examples.teleop_ros2and still forwards--ros-args. The install tree drops a level, so the DockerfileWORKDIRfollows, as do the three invocations inbuild-ubuntu.yml.Type of change
Testing
x86_64/ Ubuntu, Python 3.12. Wheel ships 15 modules underisaacteleop_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 constantsfails, so the flat names are gone rather than relocated. The newconftest.pywas checked to resolve toexamples/teleop_ros2/pythonwith the package present and no namespace__init__.py. All test files compile.pre-commitclean.Not run:
ctest -L teleop_ros2— no ROS 2 on this host, sogeometry_msgsandrclpyare 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
SKIP=check-copyright-year pre-commit run --all-filesgit commit -s) per the DCONo 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.