IMRCLab / IMRCLab/motion_capture_tracking
rosidl_generator_py error during the building
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 83
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Operating System: [e.g., Ubuntu 22.04]
- ROS2 Version: Humble
- Python Version: [e.g., 3.10]
- Build Tool: colcon
- Installation type: [e.g., from source, following the official documentation]
Description
I encountered an ImportError when attempting to build the motion_capture_tracking_interfaces
Steps to Reproduce
- Set up a ROS 2 Humble environment according to the ROS 2 documentation.
- Create a workspace for
motion_capture_tracking_interfacesand clone the repositories into thesrcdirectory. - Run
rosdep install --from-paths src --ignore-src --rosdistro humble -yto install dependencies. - Attempt to build the workspace with
colcon build.
The build process fails with the following error for the motion_capture_tracking_interfaces package:
--- stderr: motion_capture_tracking_interfaces
Traceback (most recent call last):
File "/opt/ros/humble/share/rosidl_generator_py/cmake/../../../lib/rosidl_generator_py/rosidl_generator_py", line 8, in
from rosidl_generator_py import generate_py
ImportError: cannot import name 'generate_py' from 'rosidl_generator_py' (/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_generator_py/init.py)
gmake[2]: *** [motion_capture_tracking_interfaces__py/CMakeFiles/motion_capture_tracking_interfaces__py.dir/build.make:155: rosidl_generator_py/motion_capture_tracking_interfaces/_motion_capture_tracking_interfaces_s.ep.rosidl_typesupport_fastrtps_c.c] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:590: motion_capture_tracking_interfaces__py/CMakeFiles/motion_capture_tracking_interfaces__py.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
Failed <<< motion_capture_tracking_interfaces [1.54s, exited with code 2]
Additional Context
- I confirmed that my ROS 2 environment is sourced correctly.
- Python dependencies were checked and are all present.
- Similar builds in the same environment for other packages do not encounter this issue.
Any guidance or suggestions to resolve this build error would be greatly appreciated.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with colcon build for the motion_capture_tracking_interfaces package and inspect the rosidl_generator_py entry point and ImportError shown in the report. Compare its build context with packages that succeed in the same ROS 2 Humble environment; done means the package builds successfully without the generate_py import failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100