Skip to content

Commit 240f49c

Browse files
Merge branch 'sea-bass-toggle-load-scenes'
2 parents 3221fb8 + 7a6cc2c commit 240f49c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
1414
### Changed
1515

1616
- Update `piper_mj_description` to load `piper.xml` instead of `scene.xml` (thanks to @jonzamora)
17+
- Allow passing `kwargs` to `yourdfpy.load_robot_description` (thanks to @sea-bass)
1718

1819
## [1.17.0] - 2025-05-08
1920

robot_descriptions/loaders/yourdfpy.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@
2323
def load_robot_description(
2424
description_name: str,
2525
commit: Optional[str] = None,
26+
**kwargs,
2627
) -> yourdfpy.URDF:
2728
"""Load a robot description in yourdfpy.
2829
2930
Args:
3031
description_name: Name of the robot description.
3132
commit: If specified, check out that commit from the cloned robot
3233
description repository.
34+
kwargs: arguments passed to yourdfpy.URDF.load function, including:
35+
build_scene_graph: Whether to build a scene graph from visual
36+
elements.
37+
build_collision_scene_graph: Whether to build a scene graph from
38+
collision elements.
39+
load_meshes: Whether to load the meshes for the visual elements.
40+
load_collision_meshes: Whether to load the meshes for the collision
41+
elements.
3342
3443
Returns:
3544
Robot model for yourdfpy.
@@ -42,4 +51,8 @@ def load_robot_description(
4251
if not hasattr(module, "URDF_PATH"):
4352
raise ValueError(f"{description_name} is not a URDF description")
4453

45-
return yourdfpy.URDF.load(module.URDF_PATH, mesh_dir=module.PACKAGE_PATH)
54+
return yourdfpy.URDF.load(
55+
module.URDF_PATH,
56+
mesh_dir=module.PACKAGE_PATH,
57+
**kwargs,
58+
)

0 commit comments

Comments
 (0)