Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
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
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ if __name__ == '__main__':
rob = urx.Robot("192.168.0.100")
robotiqgrip = Robotiq_Two_Finger_Gripper()

if(len(sys.argv) != 2):
if len(sys.argv) != 2:
print "false"
sys.exit()

if(sys.argv[1] == "close") :
if sys.argv[1] == "close":
robotiqgrip.close_gripper()
if(sys.argv[1] == "open") :
if sys.argv[1] == "open":
robotiqgrip.open_gripper()

rob.send_program(robotiqgrip.ret_program_to_run())
Expand All @@ -129,7 +129,7 @@ if __name__ == '__main__':

urx can control an RG2 gripper as well. The class was primarily developed by [Moritz Fey](https://github.com/Mofeywalker).

### Example use:?>
### Example use:

```python
import sys
Expand All @@ -138,19 +138,17 @@ from urx.gripper import OnRobotGripperRG2

if __name__ == '__main__':
rob = urx.Robot("192.168.0.100")
gripper = OnRobotGripperRG2()
gripper = OnRobotGripperRG2(rob)

if(len(sys.argv) != 2):
if len(sys.argv) != 2:
print "false"
sys.exit()

if(sys.argv[1] == "close") :
if sys.argv[1] == "close":
gripper.close_gripper()
if(sys.argv[1] == "open") :
if sys.argv[1] == "open":
gripper.open_gripper()

rob.send_program(robotiqgrip.ret_program_to_run())

rob.close()
print "true"
sys.exit()
Expand Down
Loading