Phylliade / ikpy

IKPy, an Universal Inverse Kinematics library
http://phylliade.github.io/ikpy
Apache License 2.0
733 stars 153 forks source link

Tutorial Error #101

Closed MADONOKOUKI closed 3 years ago

MADONOKOUKI commented 3 years ago

Hi, my name is koki. I got an error like that. I use anaconda3-5.3.1 and Python 3.5.6. I want to know why was it error happened?

`

import ikpy my_chain = ikpy.chain.Chain.from_urdf_file("model.urdf") Traceback (most recent call last): File "", line 1, in AttributeError: module 'ikpy' has no attribute 'chain' `

Benoit-LdL commented 3 years ago

Same issue here, I can't seem to get any submodules of ikpy to work. I'm running version 3.0.1 with python 2.7.12... Tried some of the test scripts without any luck: ` from ikpy.chain import Chain --> ImportError: No module named chain

import ikpy.utils.plot as plot_utils --> ImportError: No module named utils.plot

ikpy.chain.Chain() --> AttributeError: 'module' object has no attribute 'chain'

from ikpy.link import OriginLink, URDFLink --> ImportError: No module named link `

Thanks in advance for your help! Kind regards, Benoît

Phylliade commented 3 years ago

Hello @MADONOKOUKI @Benoit-LdL,

How are you installing IKPy? (On my side, i'm not able to reproduce this issue)

Besides, @MADONOKOUKI, what version of IKPy are you using?

KyleORourke2 commented 3 years ago

For clarity, we are following this quick start tutorial: https://github.com/Phylliade/ikpy/blob/master/tutorials/Quickstart.ipynb

I'm having the same issue. I'm using the latest version of ikpy v3.1 with Python 3.8.3. I've tried both 'pip install ikpy' and from source with the same error:

module 'ikpy' has no attribute 'chain'

Edit 1: Running on Python3.9.1 did not help.

Edit 2: Including

from ikpy.chain import Chain

seems to fix it.

Now it is missing 'target_frame' which I assume was supposed to be given by my_chain.forward_kinematics?

Zju-George commented 3 years ago

@Phylliade @Benoit-LdL @MADONOKOUKI @KyleORourke2 Check out this: https://stackoverflow.com/questions/8899198/module-has-no-attribute In pyik the submodule is not directory but pyfile so it is not imported automatically. A quick solution, add import in init.py like this image Then it will work. image

Piit3r commented 3 years ago

Same here in local. I also tested on google colab : I imported de Quickstart file. Just run pip install ikpy on top and execute. Then i have the same problem.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Phylliade commented 3 years ago

Hello @MADONOKOUKI, this has been fixed in master, you call pull the latest ipynb file and this will work. No need to update IKPy.