joschu / trajopt

Trajectory Optimization
http://rll.berkeley.edu/trajopt
Other
372 stars 161 forks source link

ImportError: dynamic module does not define init function (initctrajoptpy) #47

Open TJBetter opened 2 years ago

TJBetter commented 2 years ago

Hello everyone,

I'm using ubuntu 18.04. After succesful compile, I exported the pythonpath and tried to run the python example, I got the following error

:~/Documents/openrave-installation/trajopt/src/trajopt/test$ python test_initializations.py

You can set logging level with TRAJOPT_LOG_THRESH. Valid values: FATAL ERROR WARN INFO DEBUG TRACE. Defaulting to INFO

Traceback (most recent call last): File "test_initializations.py", line 5, in from trajoptpy.cart_traj_init import shortest_paths File "/home/lab/Documents/openrave-installation/trajopt/trajoptpy/init.py", line 1, in from ctrajoptpy import * ImportError: dynamic module does not define init function (initctrajoptpy)

I'm able to run the last 4 ctest as shown below

Test project /home/lab/Documents/openrave-installation/trajopt/build Start 1: arm_to_joint_target.py 1/10 Test #1: arm_to_joint_target.py .............Failed 0.20 sec Start 2: arm_to_cart_target.py 2/10 Test #2: arm_to_cart_target.py ..............Failed 0.19 sec Start 3: fullbody_plan.py 3/10 Test #3: fullbody_plan.py ...................Failed 0.19 sec Start 4: position_base.py 4/10 Test #4: position_base.py ...................Failed 0.03 sec Start 5: this_side_up.py 5/10 Test #5: this_side_up.py ....................Failed 0.19 sec Start 6: arm_to_cart_target_position_only 6/10 Test #6: arm_to_cart_target_position_only ...Failed 0.19 sec Start 7: sco-unit 7/10 Test #7: sco-unit ........................... Passed 0.03 sec Start 8: collision-checker-unit 8/10 Test #8: collision-checker-unit ............. Passed 0.03 sec Start 9: planning-unit 9/10 Test #9: planning-unit ...................... Passed 0.93 sec Start 10: cast-cost-unit 10/10 Test #10: cast-cost-unit ..................... Passed 0.03 sec

40% tests passed, 6 tests failed out of 10

Total Test time (real) = 2.02 sec

Please kindly help, thank you.

benjaminalt commented 1 year ago

I ran into this issue as well and made a PR with a fix: https://github.com/joschu/trajopt/pull/48