Verified Commit 7d87db11 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

joints: use isUnitary function instead of Eigen's one

parent af3c042c
......@@ -411,11 +411,13 @@ namespace pinocchio
typedef Eigen::Matrix<Scalar,3,1,_Options> Vector3;
JointModelPrismaticUnalignedTpl() {}
JointModelPrismaticUnalignedTpl(Scalar x, Scalar y, Scalar z)
JointModelPrismaticUnalignedTpl(const Scalar & x,
const Scalar & y,
const Scalar & z)
: axis(x,y,z)
{
axis.normalize();
assert(axis.isUnitary() && "Translation axis is not unitary");
assert(isUnitary(axis) && "Translation axis is not unitary");
}
template<typename Vector3Like>
......@@ -423,7 +425,7 @@ namespace pinocchio
: axis(axis)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Vector3Like);
assert(axis.isUnitary() && "Translation axis is not unitary");
assert(isUnitary(axis) && "Translation axis is not unitary");
}
JointDataDerived createData() const { return JointDataDerived(axis); }
......
//
// Copyright (c) 2015-2018 CNRS
// Copyright (c) 2015-2019 CNRS INRIA
// Copyright (c) 2015-2016 Wandercraft, 86 rue de Paris 91400 Orsay, France.
//
......@@ -431,11 +431,13 @@ namespace pinocchio
JointModelRevoluteUnalignedTpl() {}
JointModelRevoluteUnalignedTpl(const Scalar & x, const Scalar & y, const Scalar & z)
JointModelRevoluteUnalignedTpl(const Scalar & x,
const Scalar & y,
const Scalar & z)
: axis(x,y,z)
{
axis.normalize();
assert(axis.isUnitary() && "Rotation axis is not unitary");
assert(isUnitary(axis) && "Rotation axis is not unitary");
}
template<typename Vector3Like>
......@@ -443,7 +445,7 @@ namespace pinocchio
: axis(axis)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Vector3Like);
assert(axis.isUnitary() && "Rotation axis is not unitary");
assert(isUnitary(axis) && "Rotation axis is not unitary");
}
JointDataDerived createData() const { return JointDataDerived(axis); }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment