Skip to content

Commit e444ef1

Browse files
committed
refactor(calibration): Update deprecated Frame.parent to Frame.parentJoint subject to API changes in Pincchio 3.x
1 parent 47637ea commit e444ef1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/figaroh/calibration/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def get_sup_joints(model, start_frame, end_frame):
5656
"""
5757
start_frameId = model.getFrameId(start_frame)
5858
end_frameId = model.getFrameId(end_frame)
59-
start_par = model.frames[start_frameId].parent
60-
end_par = model.frames[end_frameId].parent
59+
start_par = model.frames[start_frameId].parentJoint
60+
end_par = model.frames[end_frameId].parentJoint
6161
branch_s = model.supports[start_par].tolist()
6262
branch_e = model.supports[end_par].tolist()
6363
# remove 'universe' joint from branches
@@ -209,7 +209,7 @@ def get_param_from_yaml(robot, calib_data) -> dict:
209209
calib_config["IDX_TOOL"] = IDX_TOOL
210210

211211
# tool_joint: ID of the joint right before the tool's frame (parent)
212-
tool_joint = robot.model.frames[IDX_TOOL].parent
212+
tool_joint = robot.model.frames[IDX_TOOL].parentJoint
213213
calib_config["tool_joint"] = tool_joint
214214

215215
# indices of active joints: from base to tool_joint

0 commit comments

Comments
 (0)