Open ysl208 opened 3 years ago
Run it from the python command line similar to using a short script: python
import urx
timeout = 1000
rob=urx.Robot("robot_ip", True)
rob.send_program("def myProg():\n\tfreedrive_mode()\nsleep({})\nend".format(timeout)) # start free drive
To exit freedrive mode, run
rob.send_program('end_freedrive_mode()')
To integrate it into iRoPro, I'd recommend writing a separate python script, which uses rospy
and listens to a rostopic. In iRoPro, add an action client that publishes to this rostopic when it needs to freeze or unfreeze (i.e. exit/enter freedrive).
For the UR5, the freedrive mode can only be activated via the teach pendant (by holding the button).