-
Notifications
You must be signed in to change notification settings - Fork 80
Jiwenc nv/robot viz #995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jiwenc-nv
wants to merge
4
commits into
main
Choose a base branch
from
jiwenc-nv/robot-viz
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Jiwenc nv/robot viz #995
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5893e10
viz: promote the robot twin out of the mujoco_xr example
jiwenc-nv bce10b7
build: move the private MuJoCo into deps/third_party
jiwenc-nv c10a6bb
build: drop the twin's physics call, trim the MuJoCo comments
jiwenc-nv 2166718
viz: keep the engage gate in the example, not the SDK
jiwenc-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Makes the MuJoCo fetched beside this file private, so a user may `pip install mujoco` at | ||
| # any version, or none, and never collide with ours. Three things hold that up, none | ||
| # optional: | ||
| # | ||
| # OUTPUT_NAME a private SONAME. The mujoco wheel's extensions carry a DT_NEEDED on | ||
| # libmujoco.so.3.x, and the loader satisfies it from whatever is already | ||
| # loaded under that SONAME -- so an unrenamed copy of ours, loaded first, | ||
| # answers the user's own `import mujoco`. | ||
| # -Bsymbolic libmujoco's cross-references bind to itself rather than to whatever copy | ||
| # is in the global scope. Not -Bsymbolic-functions: mju_user_error and | ||
| # mju_user_warning are data, and libmujoco reads them. | ||
| # dlopen/dlsym src/viz/robot_twin/cpp/mj_api.cpp resolves MuJoCo at import instead of | ||
| # linking it, so the extension has no undefined mj* for a foreign | ||
| # libmujoco to answer. | ||
| # | ||
| # Do not replace the dlopen with a plain link: an undefined mj* resolves through the | ||
| # global scope, which is searched first, and the wrong libmujoco answering is silent -- | ||
| # no error, no version warning, just mjModel laid out one way and read another. | ||
|
|
||
| # Upstream's own install rules come with the subdirectory and stay; suppressing them would | ||
| # mean patching. They cannot reach the wheel -- pyproject.toml's install.components names | ||
| # only isaacteleop_wheel and isaacteleop_binaries. | ||
|
|
||
| set_target_properties(mujoco PROPERTIES OUTPUT_NAME isaacteleop_mujoco) | ||
| # Upstream's VERSION would make libisaacteleop_mujoco.so a symlink to ...so.3.11.0, and | ||
| # wheels do not carry symlinks. Unset with no value, which REMOVES the property; "" leaves | ||
| # it set and names the library `libisaacteleop_mujoco.so.`. | ||
| set_property(TARGET mujoco PROPERTY VERSION) | ||
| set_property(TARGET mujoco PROPERTY SOVERSION) | ||
| set_property(TARGET mujoco APPEND PROPERTY LINK_OPTIONS "-Wl,-Bsymbolic") | ||
|
|
||
| # Set up an extension that reaches MuJoCo through mj_api.cpp: headers to compile against, | ||
| # libisaacteleop_mujoco.so staged beside the module for the dlopen to find, and a dynamic | ||
| # symbol table holding nothing but the entry point. `module_name` is the importable name, | ||
| # whose PyInit_ symbol is the one export. | ||
| function(isaacteleop_link_mujoco target module_name) | ||
| # Headers only. Nothing links MuJoCo, so add_dependencies supplies the build order a | ||
| # link line would otherwise have implied. | ||
| target_include_directories(${target} PRIVATE | ||
| $<TARGET_PROPERTY:mujoco,INTERFACE_INCLUDE_DIRECTORIES>) | ||
| add_dependencies(${target} mujoco) | ||
|
|
||
| # mj_api.cpp opens it by this module's own directory, so the copy has to be there -- | ||
| # in the build tree for ctest, and in the staged python_package that install(DIRECTORY) | ||
| # turns into the wheel. | ||
| add_custom_command(TARGET ${target} POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
| "$<TARGET_FILE:mujoco>" "$<TARGET_FILE_DIR:${target}>" | ||
| COMMENT "Staging $<TARGET_FILE_NAME:mujoco> beside $<TARGET_FILE_NAME:${target}>") | ||
|
|
||
| # A whitelist, so it covers what pybind11's -fvisibility=hidden misses: symbols from | ||
| # static archives (cudart_static) and the typeinfo pybind11 emits for the mjt* enums. | ||
| # Measured on robot_twin_py: 1 export, against 11 for -Wl,--exclude-libs,ALL alone. | ||
| set(_version_script "${CMAKE_CURRENT_BINARY_DIR}/${target}_exports.map") | ||
| file(GENERATE OUTPUT "${_version_script}" | ||
| CONTENT "{ global: PyInit_${module_name}; local: *; };\n") | ||
| target_link_options(${target} PRIVATE "-Wl,--version-script,${_version_script}") | ||
| set_property(TARGET ${target} APPEND PROPERTY LINK_DEPENDS "${_version_script}") | ||
| endfunction() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does those xml come from? mujoco? if so, can we just download them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(claude: no change — I think the premise doesn't hold; happy to be told otherwise.)
They're not MuJoCo's, and everything that can be downloaded already is.
The two tracked files —
leader/leader_gripper.xmlandfollower/follower_arm.xml— are ours: hand-authored NVIDIA-copyright MJCF wrappers carrying the mesh transforms, theleader_ghostmaterial, the geom-group policy and the mm→m scale. There's nothing upstream to fetch them from.Everything upstream is fetched:
scripts/fetch-so-arm.shpulls 20 files fromTheRobotStudio/SO-ARM100at a pinned commit with a per-file sha256 — 18 STLs plus upstream's ownso101_new_calib.xmland.urdf— all gitignored. That's exactly what these.gitignorerules exist for: keep the fetched assets out of git, keep our two wrappers in.I can reword the comment from "the authored wrapper XML" to "the two wrappers authored here" if that reads less ambiguously.