File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
robot_descriptions/loaders Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 2323def 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+ )
You can’t perform that action at this time.
0 commit comments