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.
14
14
### Changed
15
15
16
16
- 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 )
17
18
18
19
## [ 1.17.0] - 2025-05-08
19
20
Original file line number Diff line number Diff line change 23
23
def load_robot_description (
24
24
description_name : str ,
25
25
commit : Optional [str ] = None ,
26
+ ** kwargs ,
26
27
) -> yourdfpy .URDF :
27
28
"""Load a robot description in yourdfpy.
28
29
29
30
Args:
30
31
description_name: Name of the robot description.
31
32
commit: If specified, check out that commit from the cloned robot
32
33
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.
33
42
34
43
Returns:
35
44
Robot model for yourdfpy.
@@ -42,4 +51,8 @@ def load_robot_description(
42
51
if not hasattr (module , "URDF_PATH" ):
43
52
raise ValueError (f"{ description_name } is not a URDF description" )
44
53
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