Skip to content

Commit c2395a1

Browse files
committed
fix bug in gripper plugin where wrong link was selected while gripping
1 parent c65bfcf commit c2395a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/src/plugins/gripper/gripper.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,13 @@ Gripper::close()
183183
setPuckPose();
184184

185185
// link both models through a joint
186-
gazebo::physics::LinkPtr gripperLink = getLinkEndingWith(model_, "link");
186+
gazebo::physics::LinkPtr gripperLink = getLinkEndingWith(model_, "gripper::link");
187187

188188
if (!gripperLink) {
189189
std::cerr << "Link 'gripper_grab' not found in gripper model" << std::endl;
190190
return;
191+
} else {
192+
std::cout << "Link 'gripper_grab' is: " << gripperLink->GetName() << std::endl;
191193
}
192194

193195
gazebo::physics::LinkPtr puckLink = getLinkEndingWith(grippedPuck, "cylinder");

0 commit comments

Comments
 (0)