3 template<
template<
class...>
class MapType,
class KeyType,
class... RestTypes>
5 const MapType<KeyType, std::shared_ptr<Contact>, RestTypes...> & contactList,
6 const Eigen::VectorXd & wrenchRatio,
7 const Eigen::Vector3d & momentOrigin)
9 MapType<KeyType, sva::ForceVecd> wrenchList;
10 int wrenchRatioIdx = 0;
11 for(
const auto & contactKV : contactList)
15 contactKV.second->calcWrench(wrenchRatio.segment(wrenchRatioIdx, contactKV.second->ridgeNum()), momentOrigin));
16 wrenchRatioIdx += contactKV.second->ridgeNum();
21 template<
template<
class...>
class MapType,
class KeyType,
class... RestTypes>
23 const MapType<KeyType, std::shared_ptr<Contact>, RestTypes...> & contactList)
25 std::vector<std::shared_ptr<Contact>> contactVec;
26 for(
const auto & contactKV : contactList)
28 contactVec.push_back(contactKV.second);