Skip to content

Commit

Permalink
Merge pull request #2430 from jcarpent/topic/examples
Browse files Browse the repository at this point in the history
Fix ruff warnings
  • Loading branch information
jcarpent authored Sep 22, 2024
2 parents 7d55bf0 + 14bbfe4 commit ca07368
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions bindings/python/pinocchio/visualize/rviz_visualizer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import warnings

import numpy as np

from .. import pinocchio_pywrap_default as pin
Expand Down
12 changes: 5 additions & 7 deletions examples/inverse-kinematics-3d.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from __future__ import print_function

import numpy as np
from numpy.linalg import norm, solve

import pinocchio
from numpy.linalg import norm, solve

model = pinocchio.buildSampleModelManipulator()
data = model.createData()
Expand Down Expand Up @@ -40,8 +37,9 @@
print("Convergence achieved!")
else:
print(
"\nWarning: the iterative algorithm has not reached convergence to the desired precision"
"\nWarning: the iterative algorithm has not reached convergence to "
"the desired precision"
)

print("\nresult: %s" % q.flatten().tolist())
print("\nfinal error: %s" % err.T)
print(f"\nresult: {q.flatten().tolist()}")
print(f"\nfinal error: {err.T}")

0 comments on commit ca07368

Please sign in to comment.