TriPed-Robot / trip_kinematics

Python package for inverse kinematic calculations of hybrid serial parallel robots
https://trip-kinematics.readthedocs.io/en/main/
MIT License
29 stars 5 forks source link

Tutorials don't seem to work on Ubuntu 20, Python 3.8 #74

Closed bmagyar closed 2 years ago

bmagyar commented 2 years ago

At least I'm trying a blunt copy paste and getting a bunch of issues from casadi and sometimes just missing bits.

NameError                                 Traceback (most recent call last)
<ipython-input-10-b74461665e3c> in <module>
      3                         values={'tx': 1.640, 'tz': -0.037, },
      4 
----> 5                         parent=closed_chain)
      6 
      7 a_ll_zero = Transformation(name='zero_angle_convention',

NameError: name 'closed_chain' is not defined

and

Exception: Implicit conversion of symbolic CasADi type to numeric matrix not supported.
This may occur when you pass a CasADi object to a numpy function.
Use an equivalent CasADi function instead of that numpy function.

It may be possible it is not expected to work on the above setup.

Please specify in the tutorials section what setup the tutorials were tested on: OS & Python version should be enough.

danielskatz commented 2 years ago

https://github.com/openjournals/joss-reviews/issues/3967 (tracking)

liquidcronos commented 2 years ago

Hi Thanks for letting me know. There seem to be two issues going on here. However I don't think they are related to the python or OS version.

The first regarding the code snippet: This was indeed an oversight, while the code snippet is not supposed to run, we did not make that clear enough. To properly explain how to build a full robot, the transformations are described before the groups. Since the initial transformation of the open chain is connected to the previous closed chain it has to reference this group even though it is not yet defined in the tutorial.

I have included a appropriate warning in the tutorial with a link to the full code used in the tutorial.

Regarding the second error It seems you have encountered the exception which we described in Issue #53 This is caused by the most recent numpy version, which is why we currently require numpy to be >=1.17.4, < 1.20.0 in the setup.py file.

Please let me know if your numpy version is between these versions so that we can more precisely specify the required numpy version.

bmagyar commented 2 years ago

Thanks for the response!

Snippet: looks clear enough now, thanks! I do recommend taking a second look at the url as it seems markdown didn't render it as one...

Casadi error: indeed the numpy version that produced it on my machine was 1.22.2, thanks for the correction.