Skip to content

rosidl_generator_py error during the building #13

Description

@AkgunOnur

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

  1. Set up a ROS 2 Humble environment according to the ROS 2 documentation.
  2. Create a workspace for motion_capture_tracking_interfaces and clone the repositories into the src directory.
  3. Run rosdep install --from-paths src --ignore-src --rosdistro humble -y to install dependencies.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions