diffco icon indicating copy to clipboard operation
diffco copied to clipboard

There are some problems with the python environment

Open bigdoubi opened this issue 3 years ago • 2 comments

Hello! I want to ask some questions about the environment configuration. I build a python 3.6 environment in anaconda and it can run speed_compare.py with the following results:

0it [00:00, ?it/s]ss: 0%| | 0/1 [00:00<?, ?it/s] Method adamdiffco, Exp 2d_3dof_exp4, time = 0.000 secs Experiments progress: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1987.82it/s]

However, when I try to run 3d_data_generation.py, there is an error:

Traceback (most recent call last): File "scripts/3d_data_generation.py", line 11, in import moveit_commander File "/opt/ros/melodic/lib/python2.7/dist-packages/moveit_commander/init.py", line 2, in from .roscpp_initializer import * File "/opt/ros/melodic/lib/python2.7/dist-packages/moveit_commander/roscpp_initializer.py", line 35, in from moveit_ros_planning_interface import _moveit_roscpp_initializer ImportError: dynamic module does not define module export function (PyInit__moveit_roscpp_initializer)

Some told me that moveit runs in python2, but I find ompl should run in python3, so I have no idea how to select the version. Therefore, is there a way to deal with this problem? Thanks very much for your early reply.

bigdoubi avatar Nov 16 '22 07:11 bigdoubi

您好,请问您解决这个问题了吗

zhaot1 avatar Jan 05 '23 03:01 zhaot1

Hi, thanks for bringing this up.

It looks like an issue with moveit installation to me. We want to provide more detailed information on dependency installation but before that let me give just a bit more information and see if that helps.

So I installed moveit noetic from source code in a conda environment with Python 3. I do vaguely recall I had to specify some build flag to make moveit build with Python 3 and find the location of the Python interpreter of my conda environment (instead of the system default one). On top of that, I had to modify some python scripts inside moveit to make them Python 3 compatible (well, basically changing print "xxx" to print("xxx")). Could you try installing moveit in Python 3?

YuhengZhi avatar Jan 24 '23 19:01 YuhengZhi