Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
### Changed

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

## [1.17.0] - 2025-05-08

Expand Down
12 changes: 11 additions & 1 deletion robot_descriptions/loaders/yourdfpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@
def load_robot_description(
description_name: str,
commit: Optional[str] = None,
**kwargs,
) -> yourdfpy.URDF:
"""Load a robot description in yourdfpy.

Args:
description_name: Name of the robot description.
commit: If specified, check out that commit from the cloned robot
description repository.
kwargs: arguments passed to yourdfpy.URDF.load function, including:
build_scene_graph: Whether to build a scene graph from visual elements.
build_collision_scene_graph: Whether to build a scene graph from collision elements.
load_meshes: Whether to load the meshes for the visual elements.
load_collision_meshes: Whether to load the meshes for the collision elements.

Returns:
Robot model for yourdfpy.
Expand All @@ -42,4 +48,8 @@ def load_robot_description(
if not hasattr(module, "URDF_PATH"):
raise ValueError(f"{description_name} is not a URDF description")

return yourdfpy.URDF.load(module.URDF_PATH, mesh_dir=module.PACKAGE_PATH)
return yourdfpy.URDF.load(
module.URDF_PATH,
mesh_dir=module.PACKAGE_PATH,
**kwargs,
)
Loading