diff --git a/include/hpp/manipulation/device.hh b/include/hpp/manipulation/device.hh index 25861704e8a16cfa1ed0767e22d2c6c2a01ab2f8..53d12cb98f84f0120d8a0e5abcee9d90679dde53 100644 --- a/include/hpp/manipulation/device.hh +++ b/include/hpp/manipulation/device.hh @@ -64,6 +64,9 @@ namespace hpp { FrameIndices_t robotFrames (const std::string& robotName) const; + void removeJoints(const std::vector<std::string>& jointNames, + Configuration_t referenceConfig); + core::Container <HandlePtr_t> handles; core::Container <GripperPtr_t> grippers; core::Container <JointAndShapes_t> jointAndShapes; diff --git a/src/device.cc b/src/device.cc index 09b8b4afbbf5ad272e64ee674118061fa2e5cc36..4d19b9b3517367d0280707d7cb77f45292a55748 100644 --- a/src/device.cc +++ b/src/device.cc @@ -124,6 +124,16 @@ namespace hpp { return frameIndices; } + void Device::removeJoints(const std::vector<std::string>& jointNames, + Configuration_t referenceConfig) + { + Parent_t::removeJoints(jointNames, referenceConfig); + + for (auto& pair : grippers.map) + pair.second = pinocchio::Gripper::create(pair.second->name(), self_); + // TODO update handles and jointAndShapes + } + std::ostream& Device::print (std::ostream& os) const { Parent_t::print (os);