-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fetch remote resources (at runtime, with caching) #9498
Comments
My dev branch has a solution from @jwnimmer-tri that was partially working: https://github.com/RussTedrake/drake/tree/lab1 but it raised more complex questions about when these resources were available --- do they get installed, etc. Will definitely want a solution to this going forward, but was able to get around it for the immediate need. |
@EricCousineau-TRI -- fyi, this is related to the ycb object discussion. please connect to (or even close) this issue if/when you make progress? |
Sounds good! This dovetails into the install story for #6124; for now, will keep this as-is, but establish the issue connection. |
@RussTedrake any new reflections on this use case? For my part, I guess if I'm working with simulation assets, I always want it under source control anyway, so I end up committing it somewhere into git, even if its only a personal git repo. Is there a use case for directly fetching https URLs from, say, |
FTR I agree with Jeremy. We can be creative on how we fetch from Git / Bazel (e.g. a simplified version of |
In my mind, I would like to reduce the overhead of pulling assets from e.g.: Having gone through the steps of putting a single model in RobotLocomotion/models, I can say that there is significant friction in that approach. I appreciate the complexity... examples in drake might have to worry about licenses (especially if we install/redistribute) in addition to versions. But what if I’m writing the example in my external repo (like underactuated or manipulation)? Do we just say that each repo should provide their own functionality, or do we provide some support through the drake library for fetching those resources? |
My sense is that the typical way to handle those things is in the build system and package paths, not through runtime fetching from simulation code. Perhaps we should ship (or document existing) CMake or Bazel or ROS-ish macros that pull external models into the workspace. |
Yes, that sounds very reasonable to me. I think the "runtime" thinking that found it's way in the title was perhaps inspired by the machine learning workflows (e.g. https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#loading-and-normalizing-cifar10 ). I do think making it easy to bring in diverse resources can be a game changer. |
@jwnimmer-tri -- i believe you've been working on this. Might you want to take ownership of the issue? |
I have been thinking about it a bit, and in any case I'm happy to take it into my list. The related ticket that I'm actually more actively working on is #15774 -- solving the distribution and fetch problem for Drake's model files (only), rather than a fully-general solution. |
As it turns out, I did need to solve this as a step towards #15574. For the WIP see |
A few thoughts from f2f chat today:
|
Here's how we do it currently: drake/tools/install/dockerhub/jammy/Dockerfile Lines 14 to 16 in 03b2e61
If we find that that line is too complicated for users, we could imagine adding sugar for it like |
The only remaining question here is about tutorials and/or examples. At the moment, we have only the PackageMap.AddRemote documentation. We could imagine writing a tutorial that used AddRemote, but I think it's likely that we need more than just fetching to succeed. See #15024 for the wider discussion. So I'm going to conclude that this ticket is finished, and we'll use #15024 to track the end-to-end user story. |
It would be nice to be able to have a method analogous to
FindResourceOrThrow()
that supports remote resources (e.g. grabbing sdf files from some hosted url in order to add new objects into a multibody simulation), and throw them in a local cache for future queries to make things efficient.In yet another conversation w/ @jwnimmer-tri , he suggested that there are probably good tools out there that would accomplish this. Opening this issue to track the idea.
The text was updated successfully, but these errors were encountered: