Skip to content

Commit

Permalink
fix bug in gripper plugin where wrong link was selected while gripping
Browse files Browse the repository at this point in the history
  • Loading branch information
pkohout committed Aug 22, 2022
1 parent c65bfcf commit c2395a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/src/plugins/gripper/gripper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,13 @@ Gripper::close()
setPuckPose();

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

if (!gripperLink) {
std::cerr << "Link 'gripper_grab' not found in gripper model" << std::endl;
return;
} else {
std::cout << "Link 'gripper_grab' is: " << gripperLink->GetName() << std::endl;
}

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

0 comments on commit c2395a1

Please sign in to comment.