control icon indicating copy to clipboard operation
control copied to clipboard

Problems on python run.py arm3 dmp write

Open codelover618 opened this issue 8 years ago • 5 comments

Hi, Travis,

When I run the code on Mac as this post says, an error ImportError: dlopen(/Users/cl/Downloads/control-master/studywolf_control/arms/three_link/py3LinkArm.so, 2): no suitable image found. Did find: /Users/cl/Downloads/control-master/studywolf_control/arms/three_link/py3LinkArm.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 occurs.

Then I went the directory, deleting py3LinkArm.so file and run the command python setup.py build_ext -i, but many errors and warnings occurs, 21 warnings and 11 errors generated. error: command 'clang' failed with exit status 1.

So, how can I solve this problem?

codelover618 avatar Dec 01 '17 11:12 codelover618

Ah yeah, sorry the 3 link arm isn't supported on Mac. There's some compiling problems with it and since I only use Ubuntu I haven't debugged them. Sorry about that! The examples should work with the arm2_python on Mac though!

studywolf avatar Dec 01 '17 20:12 studywolf

Thanks for replying! I will try to use Ubuntu to debug the code.

Besides, how the text file in tasks/write_data generate? They seem like the path of specified character? Can you give me some hints on generating them.

Thank you!

codelover618 avatar Dec 02 '17 12:12 codelover618

Great! It should hopefully compile for you without any issues in Ubuntu, if problems come up please let me know.

For generating the data I used a custom program that records trajectories drawn on a phone screen, it looks like though GIMP might have a way of doing it too: http://registry.gimp.org/node/25828

studywolf avatar Dec 02 '17 12:12 studywolf

Hi, Travis,

Thank you for your reply. I have successful run the code in Ubuntu!

However, it doesn't work when I use 2 link arm as what you said before. I use this command python run.py arm2 dmp write (I don't sure whether it's right.) and the error below occurs(both in Mac and Ubuntu14.04):

Traceback (most recent call last):
  File "run.py", line 55, in <module>
    arm_module = importlib.import_module(name=arm_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/parallels/Downloads/control/studywolf_control/arms/two_link/arm.py", line 19, in <module>
    from . import py2LinkArm
ImportError: cannot import name py2LinkArm

What should I do to fix this?

codelover618 avatar Dec 03 '17 06:12 codelover618

ah sorry, the one you want (that is pure python) is arm2_python not just arm2. The arm2 should hopefully work in Ubuntu after it's compiled like arm3 was, also!

studywolf avatar Dec 04 '17 15:12 studywolf