Skip to content

Commit 89bc4e0

Browse files
authored
Merge pull request #163 from gbionics/load-usd-xml-ik
Add usd and xml interfaces in ik
2 parents ae789c3 + be47af1 commit 89bc4e0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/adam/casadi/inverse_kinematics.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,21 @@ class Target:
3939
class InverseKinematics:
4040
def __init__(
4141
self,
42-
urdf_path: str,
42+
model_path: Any,
4343
joints_list: list[str],
4444
joint_limits_active: bool = True,
4545
solver_settings: dict[str, Any] = None,
4646
):
4747
"""Initialize the InverseKinematics solver.
4848
4949
Args:
50-
urdf_path (str): Path to the URDF file.
50+
model_path (Any): Path/string to a URDF or USD file, a MuJoCo MjModel, or a
51+
USD stage/dict as accepted by KinDynComputations.
5152
joints_list (list[str]): List of joint names.
5253
joint_limits_active (bool, optional): If True, enforces joint limits. Defaults to True.
5354
solver_settings (dict[str, ], optional): Settings for the solver. Defaults to None.
5455
"""
55-
self.kd = KinDynComputations(urdf_path, joints_list)
56+
self.kd = KinDynComputations(model_path, joints_list)
5657
self.ndof = len(joints_list)
5758
self.joints_list = joints_list
5859

0 commit comments

Comments
 (0)