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

Does movej support URSim? #102

Open
wly2014 opened this issue Nov 3, 2021 · 1 comment
Open

Does movej support URSim? #102

wly2014 opened this issue Nov 3, 2021 · 1 comment

Comments

@wly2014
Copy link

wly2014 commented Nov 3, 2021

Does the movej support URSim? Although I can get the state right, why I always get this error when using movej:

Current tool pose is: [-0.11606565366751193, -0.05602054660042595, -0.01930032084546665, 0.2398069576842853, -0.04788135162036506, 0.04752205982468178]
Traceback (most recent call last):
File "example_1.py", line 23, in
rob.movej((0.1, 0.1, 0.1, 0.1, 0.1, 0.1), 0.5, 0.1)
File "/usr/local/lib/python3.6/dist-packages/urx-0.11.0-py3.6.egg/urx/urrobot.py", line 330, in movej
self._wait_for_move(joints[:6], threshold=threshold, joints=True)
File "/usr/local/lib/python3.6/dist-packages/urx-0.11.0-py3.6.egg/urx/urrobot.py", line 270, in _wait_for_move
raise RobotException("Robot stopped")
urx.urrobot.RobotException: Robot stopped

thank you very much.

@Abner-fu
Copy link

Abner-fu commented Jun 13, 2024

In URsim, you can use the urx library for simulation control. However, because the URsoftware used in URsim does not support setting up the network, the is_running() in the urx library is always judged to be False, so you need to modify the files in the urx (0.11.0) library.

  1. First ensure that URsim can be pinged by the host computer, that is, URsim can communicate with the host computer.
  2. There is an ursecmon.py file in the directory where urx was downloaded. Change this line
    and self._dict["RobotModeData"]["isRobotConnected"] is True \
    to
    and self._dict["RobotModeData"]["isRobotConnected"] is False \
  3. If you are using URsoftware version >=3.5, refer to e1f78ce. The author submitted the update, but the update is not reflected in the pip install urx. So you can add these three lines manually.
  4. If you use movel or getl function, you may encounter AttributeError: 'PoseVector' object has no attribute 'tolist' or Caught an unexpected exception: module 'collections' has no attribute 'Iterable'. This is most likely caused by the incorrect math3d version. You can use
    pip uninstall math3d
    pip install math3d==3.0.0
    to solve
  5. If you encounter the problem of 4 and do not want to change the math3d version, you can refer to the link AttributeError: 'PoseVector' object has no attribute 'tolist' #117 (comment) to solve the problem, but functions such as movec still cannot be used.

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