You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttributeError: 'PoseVector' object has no attribute 'tolist' #117
The python version is 3.11. The problem is as follows:
C:\Users\YHT.conda\envs\ur5py311\python.exe E:/UR/myproj1/test.py
tried 11 times to find a packet in data, advertised packet size: -2, type: 3
Data length: 44
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: 1418
Traceback (most recent call last):
File "E:\UR\myproj1\test.py", line 10, in
pose = rob.getl() # x,y,z,rx,ry,rz
^^^^^^^^^^
File "C:\Users\YHT.conda\envs\ur5py311\Lib\site-packages\urx\robot.py", line 211, in getl
return t.pose_vector.tolist()
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PoseVector' object has no attribute 'tolist'
Reacted by axi92, FLandolt, n4z3r, Zhang Yuwei, Nikolas Engelhard and Jiang, Rong
Also had this issue, but fixed it in urx version 0.11.0 with the following fix:
In addition to the fix here: #117 (comment), which addresses using the getl() method, this should address using the movel() and translate() methods for the UR5 arms.
to this: self._wait_for_move(tpose.array[:6], threshold=threshold)
tpose seems to originally have been some iterable data structure, but is now a PoseVector class from the m3d package. Calling the array method on this class returns an iterable list, which is what the urx methods seem to expect.
It's likely you'll get a constant stream of terminal output warning about deprecation with the dist_squared() function. I commented out this warning in line 280 of vector.py in the math3d package (wherever it is in your virtual environment, system folder, etc.) to suppress this.
I tested that the movel() and translate() functions work, but it still causes an error with the translate_tool() function. Generally, I think a lot of code needs to be refactored to make everything work smoothly with the m3d libraries, but hope this helps.
Reacted by 马国富, Peng Zeng, Yuhao-Zhou, VyctorMathe, RavenCwn, Xiaoshen Han, Simon, Jiang, Rong and Fei Xiao
Also had this issue, but fixed it in urx version 0.11.0 with the following fix:
In addition to the fix here: #117 (comment), which addresses using the getl() method, this should address using the movel() and translate() methods for the UR5 arms.
to this: self._wait_for_move(tpose.array[:6], threshold=threshold) tpose seems to originally have been some iterable data structure, but is now a PoseVector class from the m3d package. Calling the array method on this class returns an iterable list, which is what the urx methods seem to expect.
It's likely you'll get a constant stream of terminal output warning about deprecation with the dist_squared() function. I commented out this warning in line 280 of vector.py in the math3d package (wherever it is in your virtual environment, system folder, etc.) to suppress this.
I tested that the movel() and translate() functions work, but it still causes an error with the translate_tool() function. Generally, I think a lot of code needs to be refactored to make everything work smoothly with the m3d libraries, but hope this helps.
great work you do! happy!
Also had this issue, but fixed it in urx version 0.11.0 with the following fix:
In addition to the fix here: #117 (comment), which addresses using the getl() method, this should address using the movel() and translate() methods for the UR5 arms.
to this: self._wait_for_move(tpose.array[:6], threshold=threshold) tpose seems to originally have been some iterable data structure, but is now a PoseVector class from the m3d package. Calling the array method on this class returns an iterable list, which is what the urx methods seem to expect.
It's likely you'll get a constant stream of terminal output warning about deprecation with the dist_squared() function. I commented out this warning in line 280 of vector.py in the math3d package (wherever it is in your virtual environment, system folder, etc.) to suppress this.
I tested that the movel() and translate() functions work, but it still causes an error with the translate_tool() function. Generally, I think a lot of code needs to be refactored to make everything work smoothly with the m3d libraries, but hope this helps.
thank you
pip uninstall math3d
pip install math3d==3.0.0
I try this and it works well
There are several more bugs like this, especially when using math3d v4. Looks like repo isn't maintained anymore so allPoseVector related bugs I ran into are fixed here: https://github.com/samyk/python-urx/
Activity
TrinhNC commentedon Sep 26, 2023
got the same error. have you solved it?
MathijsNL commentedon Sep 28, 2023
I also got this error.
It seems related to the addition of the math3d library. The following function will also give an error:
It seems in general there has been some degradation in working with tposes. I will try to dive into it somewhere this or next week.
MathijsNL commentedon Sep 28, 2023
In the meantime, downgrading to version 0.8.2 works fine if you change this line to False:
axi92 commentedon Oct 24, 2023
When you change this line https://github.com/SintefManufacturing/python-urx/blob/0.11.0/urx/robot.py#L211
to:
return t.pose_vector.get_array().tolist()it works again.
jorge5a commentedon Nov 3, 2023
It didn't works with this change
return t.pose_vector.get_array().tolist()
I use the last version. Another idea?
YHt666 commentedon Nov 4, 2023
I have chosen another package called Universal_Robots_ROS_Driver. No problems so far. You can try it out. Good luck!
FLandolt commentedon Nov 20, 2023
HI this worked but have you found a better solution in the mean time ? :D
n4z3r commentedon Nov 21, 2023
Please fix!! I got it too
n4z3r commentedon Nov 21, 2023
This does not allow movej to work. It lets movel to work though. We need all functionality please.
se-hwan commentedon Dec 12, 2023
Also had this issue, but fixed it in
urxversion 0.11.0 with the following fix:In addition to the fix here: #117 (comment), which addresses using the
getl()method, this should address using themovel()andtranslate()methods for the UR5 arms.Change this line:
python-urx/urx/urrobot.py
Line 313 in c5dba85
to this:
prog = self._format_move(command, tpose.array, acc, vel, prefix="p")Similarly, modify this line:
python-urx/urx/urrobot.py
Line 316 in c5dba85
to this:
self._wait_for_move(tpose.array[:6], threshold=threshold)tposeseems to originally have been some iterable data structure, but is now aPoseVectorclass from them3dpackage. Calling thearraymethod on this class returns an iterable list, which is what theurxmethods seem to expect.It's likely you'll get a constant stream of terminal output warning about deprecation with the
dist_squared()function. I commented out this warning in line 280 ofvector.pyin themath3dpackage (wherever it is in your virtual environment, system folder, etc.) to suppress this.I tested that the
movel()andtranslate()functions work, but it still causes an error with thetranslate_tool()function. Generally, I think a lot of code needs to be refactored to make everything work smoothly with them3dlibraries, but hope this helps.zp2546265641 commentedon Jul 18, 2024
feixiao98 commentedon Nov 4, 2025
thank you
pip uninstall math3d
pip install math3d==3.0.0
I try this and it works well
samyk commentedon Jan 21, 2026
There are several more bugs like this, especially when using math3d v4. Looks like repo isn't maintained anymore so allPoseVector related bugs I ran into are fixed here: https://github.com/samyk/python-urx/