-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moveit-ros-planning-interface seems to be missing Python API #374
Comments
Looks like #371 |
@Tobias-Fischer thanks for looking into it.
not sure, what else could I try? |
When did you create the environment? If it was before May 30, could you please try creating it fresh? |
I just checked and indeed something is wrong with this package. I'm not sure what though. The |
At least |
@traversaro it is |
I don't have much knowledge in this don't know if the following is helpful or not. I had encountered the same problem past week with ros-noetic osx64 . Going through stackoverflow and similar git issues, I stumbled upon this possible soln of soft linking the
|
Ah cool, that's good intel. The segfault is probably because they are linking to PYTHON_LIBRARIES. That should be an easy fix. |
I'm not sure what the best way is to fix the library name though - @traversaro you are the CMake expert, there is probably a standard way? |
A quick reminder @traversaro |
Hi @fedor-chervinskii - I've uploaded new packages that should work. Could you please try? |
Sorry about that, I missed the original notification. I guess this is now fixed? |
Yes thank you :) |
Hi, I tried to install $ mamba install -c robostack-staging "ros-noetic-moveit==1.1.13"
Looking for: ['ros-noetic-moveit==1.1.13']
conda-forge/osx-64 Using cache
conda-forge/noarch Using cache
robostack-staging/osx-64 No change
robostack-staging/noarch No change
Pinned packages:
- python 3.9.*
Could not solve for environment specs
The following package could not be installed
└─ ros-noetic-moveit 1.1.13 is installable and it requires
└─ ros-distro-mutex 0.5.* , which can be installed. When trying to force reinstall the
|
Can you try in a fresh environment? The new packages use Python 3.11 . |
Ah ok, figured this could be a one of the issues. Thanks ! |
I tried the updated package in a fresh python 3.11 environment, the installation was successful.
When trying to import the moveit_commander, this throws the old error related to
|
I reproduced the problem, but for me the error is slightly different (Command Prompt?):
|
On osx-arm64, I get:
EDIT: |
The issue on osx-64 is that the
It seems that |
The issue is that |
I temporarily fixed it with RoboStack/vinca@bebaf58 and rebuilt the osx-64 package (same build number, so you would need to clear your cache and force re-downloading the package - sorry for that). |
FYI - you can now |
Hi @traversaro - do you want to take a look at the Windows issue, or should I close here? |
Quick reminder @traversaro :) |
Quick workaroundTL;DR a quick workaround for anyone having this problem is to run once in the environment:
or always set the following env variable:
Long explanationOk, this was a tricky one. Somehow:
was failing in python, but nothing was wrong when opening import os
prefix = "C:/Users/straversaro/AppData/Local/miniforge3/envs/ros-noetic-moveit-ros-planning-interface/Library"
libraries_to_test = []
libraries_to_test.append(prefix+"/lib/site-packages/moveit_ros_planning_interface/_moveit_move_group_interface.pyd")
libraries_to_test.append(prefix+"/lib/site-packages/moveit_ros_planning_interface/_moveit_planning_scene_interface.pyd")
libraries_to_test.append(prefix+"/lib/site-packages/moveit_ros_planning_interface/_moveit_robot_interface.pyd")
libraries_to_test.append(prefix+"/lib/site-packages/moveit_ros_planning_interface/_moveit_roscpp_initializer.pyd")
# Loop through the files in the specified directory
for filename in os.listdir(prefix+"/bin"):
if filename.endswith(".dll"):
libraries_to_test.append(prefix+"/bin/"+filename)
import ctypes
loaded_libraries = []
libraries_not_loaded = []
for library_name in libraries_to_test:
try:
# Load the library
_ = ctypes.cdll.LoadLibrary(library_name)
loaded_libraries.append(library_name)
print(f"Library '{library_name}' loaded successfully.")
except Exception as e:
print(f"Error loading library '{library_name}': {e}")
libraries_not_loaded.append(library_name)
# Print the list of loaded libraries
print("List of Loaded Libraries:", loaded_libraries)
print("List of non-loaded Libraries:", libraries_not_loaded) With this, I noticed that somehow a lot of moveit libraries were listed under the "List of non-loaded Libraries" part. So there was something strange. Iterating a bit between the script and the DependenciesGui, I was able to notice that there were two .dll that were wrongly installed in |
I noticed a few more offending examples of this in a standard installation of |
Solution to issue cannot be found in the documentation.
Issue
Please help me understand what's the actual problem. It looks like the package has been built without Python API
Arch: osx-arm64
Version of the package:
ros-noetic-moveit-ros-planning-interface 1.1.12 py39hae387e0_6 robostack-staging
Trying to call
import moveit_commander
from Python and facing this error:ImportError: cannot import name '_moveit_roscpp_initializer' from 'moveit_ros_planning_interface' (/Users/theo/miniconda3/envs/ros_env/lib/python3.9/site-packages/moveit_ros_planning_interface/__init__.py)
the
__init__.py
and the folder appears to be emptyInstalled packages
Environment info
The text was updated successfully, but these errors were encountered: