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
loco-3d
Multicontact-api
Commits
0e4a58ea
Commit
0e4a58ea
authored
May 05, 2020
by
Pierre Fernbach
Browse files
[Tests] update tests to changes in concatenateEffectorTrajectory
parent
c1c65945
Changes
1
Hide whitespace changes
Inline
Side-by-side
unittest/scenario.cpp
View file @
0e4a58ea
...
...
@@ -1723,6 +1723,29 @@ BOOST_AUTO_TEST_CASE(contact_sequence_concatenate_effector_traj) {
BOOST_CHECK
(
traj
(
8.
).
isApprox
(
traj_2
->
operator
()(
8.
)));
BOOST_CHECK
(
traj
(
2.5
).
isApprox
(
traj_0
->
operator
()(
2.
)));
BOOST_CHECK
(
traj
(
3.8
).
isApprox
(
traj_0
->
operator
()(
2.
)));
BOOST_CHECK_THROW
(
cs1
.
concatenateEffectorTrajectories
(
"test"
),
std
::
invalid_argument
);
ContactPhase
cp3
=
ContactPhase
(
8
,
12.
);
cs1
.
append
(
cp3
);
traj
=
cs1
.
concatenateEffectorTrajectories
(
"right_leg"
);
BOOST_CHECK
(
traj
.
min
()
==
0.
);
BOOST_CHECK
(
traj
.
max
()
==
12.
);
ContactPhase
cpm1
=
ContactPhase
(
-
2.
,
0.
);
ContactSequence
cs2
=
ContactSequence
(
0
);
cs2
.
append
(
cpm1
);
cs2
.
append
(
cp0
);
cs2
.
append
(
cp1
);
cs2
.
append
(
cp2
);
traj
=
cs2
.
concatenateEffectorTrajectories
(
"right_leg"
);
BOOST_CHECK
(
traj
.
min
()
==
-
2.
);
BOOST_CHECK
(
traj
.
max
()
==
8.
);
cs2
.
append
(
cp3
);
traj
=
cs2
.
concatenateEffectorTrajectories
(
"right_leg"
);
BOOST_CHECK
(
traj
.
min
()
==
-
2.
);
BOOST_CHECK
(
traj
.
max
()
==
12.
);
}
BOOST_AUTO_TEST_CASE
(
contact_sequence_concatenate_force_traj
)
{
...
...
Write
Preview
Markdown
is supported
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