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
a94a1322
Commit
a94a1322
authored
Jan 30, 2020
by
Pierre Fernbach
Browse files
Fix mistake in the use of transform in moveEfectorOf
parent
e423dd32
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/multicontact-api/scenario/contact-sequence.hpp
View file @
a94a1322
...
...
@@ -216,7 +216,7 @@ struct ContactSequenceTpl : public serialization::Serializable<ContactSequenceTp
if
(
!
m_contact_phases
.
back
().
isEffectorInContact
(
eeName
))
throw
std
::
invalid_argument
(
"In moveEffectorToPlacement : effector is not currently in contact : "
+
eeName
);
ContactPatch
::
SE3
previous
(
m_contact_phases
.
back
().
contactPatch
(
eeName
).
placement
());
ContactPatch
::
SE3
target
=
previous
.
act
(
transform
);
ContactPatch
::
SE3
target
=
transform
.
act
(
previous
);
return
moveEffectorToPlacement
(
eeName
,
target
,
durationBreak
,
durationCreate
);
}
...
...
unittest/python/scenario.py
View file @
a94a1322
...
...
@@ -1486,7 +1486,7 @@ class ContactSequenceTest(unittest.TestCase):
self
.
assertTrue
(
cs1
.
size
()
==
10
)
self
.
assertFalse
(
cs1
.
contactPhases
[
8
].
isEffectorInContact
(
"left-leg"
))
self
.
assertTrue
(
cs1
.
contactPhases
[
9
].
isEffectorInContact
(
"left-leg"
))
target_placement
=
cs1
.
contactPhases
[
7
].
contactPatch
(
"left-leg"
).
placement
.
act
(
target_transform
)
target_placement
=
target_transform
.
act
(
cs1
.
contactPhases
[
7
].
contactPatch
(
"left-leg"
).
placement
)
self
.
assertTrue
(
cs1
.
contactPhases
[
9
].
contactPatch
(
"left-leg"
).
placement
==
target_placement
)
self
.
assertTrue
(
cs1
.
contactPhases
[
9
].
contactPatch
(
"left-leg"
).
friction
==
10.
)
# check that the other contactPatch have been copied :
...
...
unittest/scenario.cpp
View file @
a94a1322
...
...
@@ -1567,7 +1567,7 @@ BOOST_AUTO_TEST_CASE(contact_sequence_helper) {
BOOST_CHECK
(
cs1
.
size
()
==
10
);
BOOST_CHECK
(
!
cs1
.
contactPhase
(
8
).
isEffectorInContact
(
"left_foot"
));
BOOST_CHECK
(
cs1
.
contactPhase
(
9
).
isEffectorInContact
(
"left_foot"
));
target_placement
=
cs1
.
contactPhase
(
7
).
contactPatch
(
"left_foot"
).
placement
()
.
act
(
target_transform
);
target_placement
=
target_transform
.
act
(
cs1
.
contactPhase
(
7
).
contactPatch
(
"left_foot"
).
placement
());
BOOST_CHECK
(
cs1
.
contactPhase
(
9
).
contactPatch
(
"left_foot"
).
placement
()
==
target_placement
);
BOOST_CHECK
(
cs1
.
contactPhase
(
9
).
contactPatch
(
"left_foot"
).
friction
()
==
10.
);
// check that the other contactPatch have been copied :
...
...
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