Skip to content

Commit 4352249

Browse files
committed
Change auxiliary arguments of bullet load_robot_description
1 parent 30ef704 commit 4352249

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

robot_descriptions/loaders/pybullet.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,21 @@
2525
import pybullet
2626

2727

28-
def load_robot_description(description_name: str,
29-
basePosition=(0, 0, 0), baseOrientation=(0, 0, 0, 1), flags=-1,
30-
useFixedBase=0, physicsClientId=0, commit=None) -> int:
28+
def load_robot_description(
29+
description_name: str, commit=None, **kwargs
30+
) -> int:
3131
"""
3232
Load a robot description in PyBullet.
3333
3434
Args:
3535
description_name: Name of the robot description.
36-
basePosition: 3D position of the base of the robot in world coordinates.
37-
baseOrientation: orientation in quaternion (xyzw) of the base of the robot in world coordinates.
38-
flags: int flags for the URDF loading in pybullet.
39-
useFixedBase: boolean indicating use a fix joint between world and robot base.
40-
physicsClientId: int indicating the pybullet client id.
4136
commit: If specified, check out that commit from the cloned robot description repository.
37+
kwargs: arguments passed to pybullet.loadURDF function, including:
38+
basePosition: 3D position of the base of the robot in world coordinates.
39+
baseOrientation: orientation in quaternion (xyzw) of the base of the robot in world coordinates.
40+
flags: int flags for the URDF loading in pybullet.
41+
useFixedBase: boolean indicating use a fix joint between world and robot base.
42+
physicsClientId: int indicating the pybullet client id.
4243
4344
Returns:
4445
Integer identifier of the robot in PyBullet.
@@ -50,7 +51,5 @@ def load_robot_description(description_name: str,
5051
raise ValueError(f"{description_name} is not a URDF description")
5152

5253
pybullet.setAdditionalSearchPath(module.PACKAGE_PATH)
53-
robot = pybullet.loadURDF(module.URDF_PATH,
54-
basePosition=basePosition, baseOrientation=baseOrientation, flags=flags,
55-
useFixedBase=useFixedBase, physicsClientId=physicsClientId)
54+
robot = pybullet.loadURDF(module.URDF_PATH, **kwargs)
5655
return robot

0 commit comments

Comments
 (0)