in src/rosbridge/fetch_proxy.py [0:0]
def set_gripper_action(self, action):
grip = action[self.joint_name_map.get('l_gripper_finger_joint')]
goal = GripperCommandGoal()
if grip > 0:
goal.command.max_effort = 60*min(1.0, grip)
goal.command.position = 0.0
else:
goal.command.max_effort = 60
goal.command.position = 0.1
self.gripper_client.send_goal(goal)
with self.timeseq_mutex:
if self.timeseq:
state = {
'__type': 'FetchGripperAction',
'action': grip,
'effort': goal.command.max_effort,
'pos': goal.command.position,
}
self.timeseq.add(time.time(), 'gripper_action', state)