Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

movej <wait=True> not working #109

Open
danielghirst opened this issue Jun 17, 2022 · 2 comments
Open

movej <wait=True> not working #109

danielghirst opened this issue Jun 17, 2022 · 2 comments

Comments

@danielghirst
Copy link

danielghirst commented Jun 17, 2022

Versions:
Python 3.8.10
urx 0.11.0
URSoftware 5.1.0.40195

Issue:
movej does not wait when I set wait to wait = True.

Code snippet:

def goto_loading_position(robot):
    pos = ((2*pi), (1.117011), (-1.797689), (-0.8726646), (0.5*pi), (2*pi)) #works with testing mag cal
    vel = 0.5
    acc = 0.5

    #Goto position
    try:
        robot.movej(pos, acc=acc, vel=vel, wait=True, relative=False, threshold=None)
    except Exception as e:
        print("Robot could not execute goto loading position (emergency stop for example), do something")
        print("\nException:", e, "\n")

./robot_loading_position_cmd.py
tried 11 times to find a packet in data, advertised packet size: -2, type: 3
Data length: 68
tried 11 times to find a packet in data, advertised packet size: -2, type: 3
Data length: 1092
tried 11 times to find a packet in data, advertised packet size: -2, type: 3
Data length: 1444
Robot could not execute goto loading position (emergency stop for example), do something

Exception: Robot stopped

It looks like that exception comes from urrobot.py??

if not self.is_running():
     raise RobotException("Robot stopped")
@danielghirst
Copy link
Author

danielghirst commented Jun 20, 2022

Update:

When I change if self._dict["RobotModeData"]["robotMode"] == rmode\ to if self._dict["RobotModeData"]["robotMode"] == 7 \ inside ursecmon.py I no longer have the issue.

@yongpan0715
Copy link

Thank you, it is useful, successfully solved my problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants