Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
ndcurves
Commits
910bb2d9
Commit
910bb2d9
authored
Jan 23, 2020
by
Pierre Fernbach
Browse files
[Tests] add test case for SE3::translation_curve and rotation_curve methods
parent
14adc7ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/Main.cpp
View file @
910bb2d9
...
...
@@ -1855,6 +1855,36 @@ void se3CurveTest(bool& error) {
std
::
cout
<<
"SE3 curve : second order derivative for rotation should be null"
<<
std
::
endl
;
}
// check accessor to translation curves :
curve_ptr_t
translation
=
cBezier
.
translation_curve
();
if
(
translation
->
operator
()(
min
)
!=
cBezier
(
min
).
translation
())
{
error
=
true
;
std
::
cout
<<
"SE3 curve : translation curve not equal to se3.translation"
<<
std
::
endl
;
}
if
(
translation
->
operator
()(
max
)
!=
cBezier
(
max
).
translation
())
{
error
=
true
;
std
::
cout
<<
"SE3 curve : translation curve not equal to se3.translation"
<<
std
::
endl
;
}
if
(
translation
->
operator
()((
max
+
min
)
/
2.
)
!=
cBezier
((
max
+
min
)
/
2.
).
translation
())
{
error
=
true
;
std
::
cout
<<
"SE3 curve : translation curve not equal to se3.translation"
<<
std
::
endl
;
}
// check accessor to rotation curves :
curve_rotation_ptr_t
rotation
=
cBezier
.
rotation_curve
();
if
(
!
rotation
->
operator
()(
min
).
isApprox
(
cBezier
(
min
).
rotation
()))
{
error
=
true
;
std
::
cout
<<
"SE3 curve : rotation curve not equal to se3.rotation"
<<
std
::
endl
;
}
if
(
!
rotation
->
operator
()(
max
).
isApprox
(
cBezier
(
max
).
rotation
()))
{
error
=
true
;
std
::
cout
<<
"SE3 curve : rotation curve not equal to se3.rotation"
<<
std
::
endl
;
}
if
(
!
rotation
->
operator
()((
max
+
min
)
/
2.
).
isApprox
(
cBezier
((
max
+
min
)
/
2.
).
rotation
()))
{
error
=
true
;
std
::
cout
<<
"SE3 curve : rotation curve not equal to se3.rotation"
<<
std
::
endl
;
}
// check if errors are correctly raised
try
{
cBezier
(
0.1
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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