Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion include/hpp/manipulation/device.hh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ class HPP_MANIPULATION_DLLAPI Device
/// \param name of the new instance,
static DevicePtr_t create(const std::string& name);

DevicePtr_t self() { return shared_from_this(); }
DevicePtr_t self() {
return enable_shared_from_this<Device>::shared_from_this();
}

/// Print object in a stream
virtual std::ostream& print(std::ostream& os) const;
Expand Down
5 changes: 3 additions & 2 deletions src/device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ void Device::removeJoints(const std::vector<std::string>& jointNames,
Parent_t::removeJoints(jointNames, referenceConfig);

for (auto& pair : grippers.map)
pair.second =
pinocchio::Gripper::create(pair.second->name(), shared_from_this());
pair.second = pinocchio::Gripper::create(
pair.second->name(),
std::enable_shared_from_this<Device>::shared_from_this());
// TODO update handles and jointAndShapes
}

Expand Down
4 changes: 4 additions & 0 deletions src/graph/edge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ ConstraintSetPtr_t Edge::buildPathConstraint() {
shared_ptr<core::ObstacleUserInterface> oui =
HPP_DYNAMIC_PTR_CAST(core::ObstacleUserInterface, pathValidation_);
if (oui) {
// Compute forward kinematics and geometry placement to avoid assertions on
// non initialized data
g->robot()->computeForwardKinematics(pinocchio::COMPUTE_ALL);
g->robot()->updateGeometryPlacements();
relMotion_ = RelativeMotion::matrix(g->robot());
RelativeMotion::fromConstraint(relMotion_, g->robot(), constraint);
oui->filterCollisionPairs(relMotion_);
Expand Down