Closed devemin closed 2 years ago
Did this lib unsatisfy your need? Because this lib could work under raspbian buster, 64bit.
@TrivasZhang Thanks for you reply.
Maybe Is the lib file for python 3.7 ?
I think it can't use with python 3.8, right ? I try it with raspi4 (ubuntu20.04/64bit/python 3.8 ), but It appeared the import error.
cd ./build cmake .. make -j4 //change the source, "sys.path.append('../lib/python/arm64')"
export LD_LIBRARY_PATH=/path-to-unitree_legged_sdk/lib/cpp/arm64:$LD_LIBRARY_PATH python3 ../example_py/example_walk.py
ModuleNotFoundError: No module named 'robot_interface'
I need to use with python 3.8.
or, Should I install python 3.7 ?
fix
export LD_LIBRARY_PATH=/path-to-unitree_legged_sdk/lib/cpp/arm64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/cpp/arm64:$LD_LIBRARY_PATH
So could this 3.7 version lib works with python3.8? I know the 3.8 is more versatile, but the known issue is that many delivered robots are python 3.7.
No, It fix only the path string. I tried, but It didn't work with python 3.8 yet. (It showed as screenshot.)
If unitree can provide the lib for python 3.8, It is convenient. But If can't, I will try to add python 3.7.
Thank you, @TrivasZhang
I'll add 3.8.
fix
export LD_LIBRARY_PATH=/path-to-unitree_legged_sdk/lib/cpp/arm64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/cpp/arm64:$LD_LIBRARY_PATH
Did absolute path not work?
I did again with absolute path, but same result.
( Off course Go1's raspi can work with this.)
cd
to example_py folder then python3 example_walk.py
Thanks @TrivasZhang
same
I think because of module version.
Use sys.path.append('../lib/python/arm64')
By the way, where did you find this raspi4 (ubuntu20.04/64bit/python 3.8 ) system image?
Use sys.path.append('../lib/python/arm64')
same result.
and I tried another way.
cd ../example_py
cp ../lib/python/arm64/robot_interface.cpython-37m-aarch64-linux-gnu.so ./
//change the source
import robot_interface as sdk
->
from . import robot_interface as sdk
then error message has changed.
ubuntu@rpi4ubuntu2004:~/unitreeSDKs/leggedSDK3.8/unitree_legged_sdk/example_py$ python3 ./example_walk.py
Traceback (most recent call last):
File "./example_walk.py", line 8, in <module>
from . import robot_interface as sdk
ImportError: attempted relative import with no known parent package
I don't know about this meaning.
And about Ubuntu 20.04 system image:
I installed the raspi4 (Ubuntu20.04 /64bit/python3.8) with Ubuntu server image (It is CUI), and installed the GUI easy setting script. (the name is desktopify.)
git clone https://github.com/wimpysworld/desktopify.git cd desktopify sudo ./desktopify --de ubuntu
ref: (japanese, sorry) https://gihyo.jp/admin/serial/01/ubuntu-recipe/0624?page=2
Next, I try to rename the lib.
mv ./robot_interface.cpython-37m-aarch64-linux-gnu.so robot_interface.so
Then version mismatch log appeared.
import robot_interface Traceback (most recent call last): File "
", line 1, in ImportError: Python version mismatch: module was compiled for Python 3.7, but the interpreter version is incompatible: 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0].
Thanks.
Please wait for the 3.8 version lib.
Dear TrivasZhang,
Thanks for helping me. I really appreciate it. I will wait for it.
devemin
I update the lib, could you try again?
Dear @TrivasZhang
Thanks for your quick action.
And It works great !!! I can move my dog with python 3.8 ! and No errors happened.
I appreciate your correspondence.
devemin
Good to hear that! If everything stable, I'll make a release.
I will use and test this for a week :-)
Is there a python 3.10.6 solution for the: " No module named 'robot_interface' " problem ?
Hello,we have provided the python_wrapper,please check and any version of Python (>3.0) can be used to control the robot dog (https://github.com/unitreerobotics/unitree_legged_sdk/tree/go1/python_wrapper)
Hello,we have provided the python_wrapper,please check and any version of Python (>3.0) can be used to control the robot dog (https://github.com/unitreerobotics/unitree_legged_sdk/tree/go1/python_wrapper)
Hi, I am using python3.10.12 and I am getting the same error saying "no module named robot_interface" Can I please know how to use python_wrapper to solve this error? Or do I need to use different version of Python
Dear Unitree
I tried the python commit, It works! (Python 3.7)
And I hope Could you add the ARM64 lib (.so) for Python 3.8 ? I need to use it with another host (Python3.8 / Ubuntu 20.04 / 64bit/ Raspi 4).
https://github.com/unitreerobotics/unitree_legged_sdk/tree/master/lib/python/arm64
Thanks :-)