utils: add RobotDescriptionCache for URDF download and mesh embedding#272
Open
abhichothani42 wants to merge 2 commits into
Open
utils: add RobotDescriptionCache for URDF download and mesh embedding#272abhichothani42 wants to merge 2 commits into
abhichothani42 wants to merge 2 commits into
Conversation
This was referenced Jul 14, 2026
Collaborator
Author
This was referenced Jul 14, 2026
abhichothani42
marked this pull request as ready for review
July 14, 2026 06:07
There was a problem hiding this comment.
Pull request overview
This PR introduces a new RobotDescriptionCache utility in trossen_sdk to resolve a configured robot name (or explicit URDF path) into a URDF string by downloading from TrossenRobotics/trossen_arm_description, caching artifacts locally, and optionally embedding meshes/textures as base64 data URIs for portability.
Changes:
- Add
RobotDescriptionCache::resolve(...)implementation + public header. - Add libcurl as a required dependency and link it into
trossen_sdk. - Update CI system dependencies to install
libcurl4-openssl-dev.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
src/utils/robot_description_cache.cpp |
Implements download, cache, and URDF path rewriting / mesh embedding logic. |
include/trossen_sdk/utils/robot_description_cache.hpp |
Declares the public API and documents behavior/config parameters. |
CMakeLists.txt |
Adds the new source file and links CURL::libcurl into trossen_sdk. |
.github/workflows/build.yml |
Installs libcurl4-openssl-dev in CI to satisfy the new dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+84
to
+86
| { | ||
| auto cached = ref_cache_dir / rel_path; | ||
|
|
Comment on lines
+225
to
+229
| std::string RobotDescriptionCache::resolve( | ||
| const std::string& robot_name, | ||
| const std::string& urdf_variant, | ||
| const std::string& git_ref, | ||
| bool include_meshes) |
Comment on lines
+244
to
+246
| auto ref_cache_dir = cache_root() / git_ref; | ||
| std::filesystem::create_directories(ref_cache_dir); | ||
|
|
abhichothani42
force-pushed
the
eef-04-examples
branch
from
July 17, 2026 14:48
691bd49 to
c69f0bf
Compare
abhichothani42
force-pushed
the
urdf-01-description-cache
branch
from
July 17, 2026 14:48
56d0ee1 to
9344e57
Compare
abhichothani42
force-pushed
the
eef-04-examples
branch
from
July 17, 2026 15:21
c69f0bf to
68bbe05
Compare
abhichothani42
force-pushed
the
urdf-01-description-cache
branch
from
July 17, 2026 15:21
9344e57 to
0f981e8
Compare
abhichothani42
force-pushed
the
urdf-01-description-cache
branch
from
July 17, 2026 16:33
0f981e8 to
584b9d7
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
This PR adds a small utility that resolves a robot name to its URDF, downloading and caching files locally, and optionally embeds all meshes as base64 data URIs so the resulting URDF is fully self-contained and portable.
Changes
RobotDescriptionCache::resolve(robot_name, urdf_variant, git_ref, include_meshes)— returns the URDF string for a robot, downloading fromTrossenRobotics/trossen_arm_descriptionat the given git ref on cache miss.~/.cache/trossen_sdk/robot_description/<git_ref>/so repeated recordings never re-download.include_meshes=false,package://mesh references are rewritten to absolute local cache paths (usable by Rerun on the same machine). Withinclude_meshes=true, meshes are embedded as base64 data URIs (usable anywhere, including Foxglove).trossen_sdkand addlibcurl4-openssl-devto the CI dependencies.Test Plan
make build)pre-commit run --all-files)Breaking Changes
None. New utility, not called by anything yet.
Related Issues
None.