Skip to content

Commit

Permalink
style: apply pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lvjonok authored and jcarpent committed Jun 24, 2024
1 parent 1a933e1 commit c3f3e08
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion include/pinocchio/bindings/python/spatial/inertia.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace pinocchio
typedef typename Inertia::Matrix4 Matrix4;
typedef typename Inertia::Matrix10 Matrix10;
typedef typename Inertia::Vector10 Vector10;

typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1, Options> VectorXs;
typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options> MatrixXs;
typedef MotionTpl<Scalar, Options> Motion;
Expand Down
8 changes: 4 additions & 4 deletions include/pinocchio/spatial/inertia.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,8 @@ namespace pinocchio
jacobian(5, 4) = -exp_2alpha * exp_d2;
jacobian(5, 5) = -s13 * exp_2alpha;
jacobian(5, 6) = -s23 * exp_2alpha;
jacobian(5, 7) = - t2 * exp_2alpha;
jacobian(5, 8) = - t1 * exp_2alpha;
jacobian(5, 7) = -t2 * exp_2alpha;
jacobian(5, 8) = -t1 * exp_2alpha;

jacobian(6, 0) =
2 * (s12 * s12 + s13 * s13 + t1 * t1 + t3 * t3 + exp_2d1 + exp_2d3) * exp_2alpha;
Expand All @@ -762,8 +762,8 @@ namespace pinocchio
jacobian(7, 9) = -t1 * exp_2alpha;

jacobian(8, 0) = -2 * (s23 * exp_d3 + t2 * t3) * exp_2alpha;
jacobian(8, 3) = - s23 * exp_2alpha * exp_d3;
jacobian(8, 5) = - exp_2alpha * exp_d3;
jacobian(8, 3) = -s23 * exp_2alpha * exp_d3;
jacobian(8, 5) = -exp_2alpha * exp_d3;
jacobian(8, 8) = -t3 * exp_2alpha;
jacobian(8, 9) = -t2 * exp_2alpha;

Expand Down
17 changes: 9 additions & 8 deletions unittest/python/bindings_inertia.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ def test_dynamic_parameters(self):
self.assertApprox(v[0], I.mass)
self.assertApprox(v[1:4], I.mass * I.lever)

I_o = I.inertia + I.mass * \
pin.skew(I.lever).transpose().dot(pin.skew(I.lever))
I_o = I.inertia + I.mass * pin.skew(I.lever).transpose().dot(pin.skew(I.lever))
I_ov = np.array(
[
[float(v[4]), float(v[5]), float(v[7])],
Expand Down Expand Up @@ -131,12 +130,14 @@ def test_log_cholesky(self):
exp_d3 = np.exp(d3)

# Create the matrix U
U = exp_alpha * np.array([
[exp_d1, s12, s13, t1],
[0, exp_d2, s23, t2],
[0, 0, exp_d3, t3],
[0, 0, 0, 1]
])
U = exp_alpha * np.array(
[
[exp_d1, s12, s13, t1],
[0, exp_d2, s23, t2],
[0, 0, exp_d3, t3],
[0, 0, 0, 1],
]
)
pseudo_chol = U @ U.T

inertia = pin.Inertia.FromLogCholeskyParameters(eta)
Expand Down
1 change: 0 additions & 1 deletion unittest/spatial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "pinocchio/spatial/cartesian-axis.hpp"
#include "pinocchio/spatial/spatial-axis.hpp"


#include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp>

Expand Down

0 comments on commit c3f3e08

Please sign in to comment.