Commit a94a1322 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

Fix mistake in the use of transform in moveEfectorOf

parent e423dd32
......@@ -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);
}
......
......@@ -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 :
......
......@@ -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 :
......
Markdown is supported
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