Skip to content
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

import Python pkg #3180

Open
HoryeongJung opened this issue Dec 26, 2024 · 5 comments
Open

import Python pkg #3180

HoryeongJung opened this issue Dec 26, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@HoryeongJung
Copy link

Description

Here’s a concise explanation in English that you can post as a GitHub issue:

Problem: ImportError with _moveit_roscpp_initializer when using moveit_commander
Description
I'm working on MoveIt 2 in ROS 2 Humble and encountering an error while trying to use the Python moveit_commander module. After successfully building MoveIt 2 from source, I get the following error when importing moveit_commander:

hl9934@meric:~/ws_moveit/src/moveit2/moveit_ros/planning_interface$ python3
Python 3.10.12 (main, Nov 6 2024, 20:22:13) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import moveit_commander
Traceback (most recent call last):
File "", line 1, in
File "/home/hl9934/ws_moveit/src/moveit2/moveit_commander/src/moveit_commander/init.py", line 2, in
from .roscpp_initializer import *
File "/home/hl9934/ws_moveit/src/moveit2/moveit_commander/src/moveit_commander/roscpp_initializer.py", line 35, in
from moveit_ros_planning_interface import _moveit_roscpp_initializer
ImportError: cannot import name '_moveit_roscpp_initializer' from 'moveit_ros_planning_interface' (/home/hl9934/ws_moveit/src/moveit2/moveit_ros/planning_interface/python/moveit_ros_planning_interface/init.py)

I want to use moveit pkg as python not cpp. But when i import the moveit_commander, upper error always occurs. So i ask gpt,

ROS Distro

Humble

OS and version

Ubuntu 22.04

Source or binary build?

Source

If binary, which release version?

No response

If source, which branch?

humble

Which RMW are you using?

CycloneDDS

Steps to Reproduce

.

Expected behavior

.

Actual behavior

.

Backtrace or Console output

No response

@HoryeongJung HoryeongJung added the bug Something isn't working label Dec 26, 2024
@sea-bass
Copy link
Contributor

MoveIt Commander was not ported to ROS 2. It is misleading that this folder was not deleted in the Humble branch, but it is gone in later versions.

@HoryeongJung
Copy link
Author

Thanks! Then can u give me some python example using moveit source or let me know some way that use moveit resource to operate ur3 manipulator in real and gazebo?

@sea-bass
Copy link
Contributor

I would recommend looking at the Humble tutorials:
https://moveit.picknik.ai/humble/index.html

If you want to the use the MoveIt 2 Python bindings specifically, these are only available on newer versions, although you can also build the main branch of MoveIt from source on Humble.
https://moveit.picknik.ai/main/index.html

@mikeferguson
Copy link
Contributor

It is misleading that this folder was not deleted in the Humble branch, but it is gone in later versions.

Should we remove it from the humble branch if it is unported?

@sea-bass
Copy link
Contributor

Should we remove it from the humble branch if it is unported?

I think yes. Likely a lot of these deletion PRs exist already and just need backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants