2525import 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