draft for instructions

This commit is contained in:
Michael Soukup 2014-08-06 14:43:57 +02:00
parent 5ab21dc8dd
commit 5d77f0fb55
4 changed files with 35 additions and 6 deletions

11
TODO
View File

@ -3,12 +3,17 @@
- Make user for robot demo (give sudo) (OK)
- Make script, place at desktop (OK)
- Add author
- Run tests.
- Run tests. (OK)
(write manual)
TESTS:
- Test with router connected to internjet (PASSED)
- Shutdown everything, restart. (without network)
- Shutdown everything, restart. (without network) (PASSED, but maybe requires to change IP)
- Test manual control, especially boundaries and force monitor. (PASSED)
- Test loops. (PASSED)
- Provoke exceptions that can halt the demo app.
Provoke exceptions that can halt the demo app:
Press stop on tablet during loop, manual control and menu (PASSED, but requires to restart the robot.)
Provoke security stop --------------''----------------- (PASSED. When looping, exit and restart the loop. It doesnt pick up where it left.)
Shutdown robot -------------------''------------------- (PASSED. The application can continue withour restart when rebooting the robot)
Close application ----------------''------------------ (PASSED)

22
demo.py
View File

@ -47,6 +47,14 @@ class UR5Demo(object):
if error:
msg.append(error)
msg.append("Stopping robot...")
self._disptxt(msg)
try:
self.controller.robot.stopl(acc=0.2)
except Exception, e:
msg.append("Could not stop robot: %s" % e)
self._disptxt(msg)
msg.append("Setting robot to freedrive mode...")
self._disptxt(msg)
try:
@ -60,7 +68,7 @@ class UR5Demo(object):
self._disptxt(msg)
if self.controller:
self.controller.cleanup()
time.sleep(2) # Give the UR5 threads a chance to terminate
time.sleep(1) # Give the UR5 threads a chance to terminate
msg.append("Exit...")
self._disptxt(msg)
pygame.quit()
@ -69,11 +77,19 @@ class UR5Demo(object):
else:
return 0
def go_home_pos(self):
self._disptxt(["Going to home configuration..."])
msg = ["Going to home configuration..."]
self._disptxt(msg)
pose = self.controller.cylinder2cartesian(config.R_HOME, config.THETA_HOME, config.Z_HOME)
move = pose + [0.5, 0.1, 0]
self.controller.exec_move(move, wait=True)
try:
self.controller.exec_move(move, wait=True)
except Exception, e:
msg.append("Error: %s" % e)
self._disptxt(msg)
time.sleep(2)
def freedrive(self):
self.controller.set_freedrive(True)

8
instructions.txt Normal file
View File

@ -0,0 +1,8 @@
Based on tests.
After security stop (red button), shut down and restart robot.
After stop during loop, exit and restart loop. (The robot doesnt continue where it stopped)
When running the application, the robot has to be initialized (all lights green or teach mode)
When the application exits normally, the robot is set to freedrive mode (TEACH on tablet)

Binary file not shown.