def _tighten_hand(self, pos_increment=0.8): self._disable_tactile_stops() pos_cmd = PoseCommand() pos_cmd.f1 = self.hand_state.finger[0].proximal + pos_increment pos_cmd.f2 = self.hand_state.finger[1].proximal + pos_increment pos_cmd.f3 = self.hand_state.finger[2].proximal + pos_increment pos_cmd.preshape = 0.0 for i in range(10): self.pos_cmd_pub.publish(pos_cmd)
def open_hand(self, req): pos_cmd = PoseCommand() pos_cmd.f1 = 0.0 pos_cmd.f2 = 0.0 pos_cmd.f3 = 0.0 pos_cmd.preshape = 0.0 for i in range(10): self.pos_cmd_pub.publish(pos_cmd) self.grasp_status = False return TriggerResponse(success=True)