Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
7406e3f3
Verified
Commit
7406e3f3
authored
Oct 17, 2019
by
Justin Carpentier
Browse files
math: revert to classic assert
parent
d74fc982
Changes
2
Show whitespace changes
Inline
Side-by-side
src/math/quaternion.hpp
View file @
7406e3f3
...
...
@@ -86,13 +86,13 @@ namespace pinocchio
#ifndef NDEBUG
const
Scalar
epsilon
=
sqrt
(
sqrt
(
Eigen
::
NumTraits
<
Scalar
>::
epsilon
()));
typedef
apply_op_if
<
less_than_or_equal_to_op
,
boost
::
is_floating_point
<
Scalar
>::
value
,
true
>
static_leq
;
PINOCCHIO_ASSERT_THROW_AT_RUNTIME
(
static_leq
::
op
(
math
::
fabs
(
N2
-
1.
),
epsilon
));
assert
(
static_leq
::
op
(
math
::
fabs
(
N2
-
1.
),
epsilon
));
#endif
const
Scalar
alpha
=
((
Scalar
)
3
-
N2
)
/
Scalar
(
2
);
PINOCCHIO_EIGEN_CONST_CAST
(
D
,
q
).
coeffs
()
*=
alpha
;
#ifndef NDEBUG
const
Scalar
M
=
Scalar
(
3
)
*
math
::
pow
(
Scalar
(
1
)
-
epsilon
,
((
Scalar
)
-
Scalar
(
5
))
/
Scalar
(
2
))
/
Scalar
(
4
);
PINOCCHIO_ASSERT_THROW_AT_RUNTIME
(
static_leq
::
op
(
math
::
fabs
(
q
.
norm
()
-
Scalar
(
1
)),
assert
(
static_leq
::
op
(
math
::
fabs
(
q
.
norm
()
-
Scalar
(
1
)),
math
::
max
(
M
*
sqrt
(
N2
)
*
(
N2
-
Scalar
(
1
))
*
(
N2
-
Scalar
(
1
))
/
Scalar
(
2
),
Eigen
::
NumTraits
<
Scalar
>::
dummy_precision
())));
#endif
}
...
...
src/math/rotation.hpp
View file @
7406e3f3
...
...
@@ -25,7 +25,7 @@ namespace pinocchio
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE
(
Vector3
,
3
);
EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE
(
Matrix3
,
3
,
3
);
PINOCCHIO_ASSERT_THROW_AT_RUNTIME_WITH_MESSAGE
(
isUnitary
(
axis
)
,
"The axis is not unitary."
);
assert
(
isUnitary
(
axis
)
&&
"The axis is not unitary."
);
Matrix3
&
res_
=
PINOCCHIO_EIGEN_CONST_CAST
(
Matrix3
,
res
);
Vector3
sin_axis
=
sin_value
*
axis
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment