Skip to content

Add a package:// resource provider plugin - #3614

Open
noah-wardlow wants to merge 1 commit into
google-deepmind:mainfrom
noah-wardlow:package-uri-provider
Open

noah-wardlow wants to merge 1 commit into
google-deepmind:mainfrom
noah-wardlow:package-uri-provider

Conversation

@noah-wardlow

@noah-wardlow noah-wardlow commented Sep 22, 2026 •

Copy link
Copy Markdown

Follow-up to #1432, which was closed as stale.

Adds plugin/package_uri, a resource provider for ROS package://<package>/<path> URIs.

  • Package lookup: AMENT_PREFIX_PATH (ament index), then ROS_PACKAGE_PATH (directory with package.xml). No ROS dependency.
  • A URI cannot resolve outside its package.
  • strippath no longer strips names claimed by a registered resource provider, so package:// meshes also load with strippath="true". mjs_dedupAssets and by-reference textures resolve file names the same way: provider files that share a base name stay distinct, and a by-reference texture keeps its URI in mjModel.paths.
  • Tests: test/plugin/package_uri, user_mesh_test, user_model_test, user_texture_test, xml_urdf_test. Full suite passes in double and single precision.
  • Bazel: //plugin/package_uri links the provider statically, like the other plugins. bazel test //... passes.
  • Not added to the release plugin set in build_steps.sh: that would register package:// in every Python install. Happy to add it if you want it shipped.

@noah-wardlow
noah-wardlow force-pushed the package-uri-provider branch 2 times, most recently from 354b9dd to f994eeb Compare September 25, 2026 19:04
@noah-wardlow

Copy link
Copy Markdown
Author

@yuvaltassa this is the fresh PR you invited on #1432. @havess it follows the plugin/ layout you suggested on #3339. Could someone approve the CI workflows? It's rebased on current main, and the full ctest suite passes locally in both double and single precision.

@noah-wardlow
noah-wardlow force-pushed the package-uri-provider branch 2 times, most recently from ba7219f to 59f6108 Compare October 12, 2026 16:47
Comment thread doc/XMLreference.rst
Comment thread doc/changelog.rst Outdated
@noah-wardlow

noah-wardlow commented Oct 20, 2026 •

Copy link
Copy Markdown
Author

@yuvaltassa can I get a maintainer review?

edit: sorry I misunderstood the import the PR into its internal repo process for merge

@yuvaltassa

Copy link
Copy Markdown
Collaborator

@havess can you TAL?

This looks nice but the providers are not my specialty

Adds plugin/package_uri, a resource provider that serves ROS-style
package://<package>/<path> URIs from the OS filesystem. It locates the
package through AMENT_PREFIX_PATH (ROS 2 install spaces, via the ament
index) and ROS_PACKAGE_PATH (ROS 1 install spaces and source trees),
with no dependency on ROS, so URDF and MJCF models can reference ROS
package assets unchanged. A URI cannot resolve outside its package.

strippath no longer strips file names that match a registered resource
provider. These names are not filesystem paths: the compiler already
treats them as absolute when combining them with meshdir, so the
provider now receives the full name even when a model sets
strippath="true".

This branch has not been deployed

No deployments
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.

3 participants