Skip to content

Commit

Permalink
fix for python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Dec 3, 2023
1 parent 7809577 commit 4097ddd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bindings/python/pinocchio/visualize/meshcat_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def initializeFrames(self, frame_ids=None, axis_length=0.2, axis_width=2):

for fid, frame in enumerate(self.model.frames):
if frame_ids is None or fid in frame_ids:
frame_viz_name = f"{self.viewerFramesGroupName}/{frame.name}"
frame_viz_name = "%s/%s" % (self.viewerFramesGroupName, frame.name)
self.viewer[frame_viz_name].set_object(
mg.LineSegments(
mg.PointsGeometry(
Expand All @@ -640,7 +640,7 @@ def updateFrames(self):
pin.updateFramePlacements(self.model, self.data)
for fid in self.frame_ids:
frame_name = self.model.frames[fid].name
frame_viz_name = f"{self.viewerFramesGroupName}/{frame_name}"
frame_viz_name = "%s/%s" % (self.viewerFramesGroupName, frame_name)
self.viewer[frame_viz_name].set_transform(
self.data.oMf[fid].homogeneous
)
Expand Down
2 changes: 1 addition & 1 deletion examples/update-model-after-urdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


def check_limb_lengths(limb_length: float) -> bool:
print(f"Checking that limbs are {limb_length} m long... ", end="")
print("Checking that limbs are %s m long... " % limp_length, end="")
for side in ("left", "right"):
for joint in ("knee", "wheel"):
joint_id = model.getJointId(f"{side}_{joint}")
Expand Down

0 comments on commit 4097ddd

Please sign in to comment.