moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.04k stars 510 forks source link

Build from Source Moveit2 fails- ROS Humble #1317

Closed Nils-ChristianIseke closed 2 years ago

Nils-ChristianIseke commented 2 years ago

Description

Following the tutorial: https://moveit.picknik.ai/humble/doc/tutorials/getting_started/getting_started.html, the build fails with the following error:

--- stderr: launch_param_builder                             
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
---
--- stderr: moveit_configs_utils        
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
---

--- stderr: moveit_task_constructor_msgs
Traceback (most recent call last):
  File "/opt/ros/humble/share/rosidl_generator_py/cmake/../../../lib/rosidl_generator_py/rosidl_generator_py", line 8, in <module>
    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]: *** [moveit_task_constructor_msgs__py/CMakeFiles/moveit_task_constructor_msgs__py.dir/build.make:328: rosidl_generator_py/moveit_task_constructor_msgs/_moveit_task_constructor_msgs_s.ep.rosidl_typesupport_fastrtps_c.c] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:590: moveit_task_constructor_msgs__py/CMakeFiles/moveit_task_constructor_msgs__py.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---

Your environment

Steps to reproduce

Follow the tutorial https://moveit.picknik.ai/humble/doc/tutorials/getting_started/getting_started.html

Expected behaviour

Build succeds.

Actual behaviour

Build fails.

Backtrace or Console output

 cd ~/ws_moveit2
colcon build --mixin release
Starting >>> srdfdom 
Starting >>> moveit_common
Starting >>> moveit_resources_panda_description
Starting >>> launch_param_builder
Starting >>> moveit_resources_fanuc_description                               
Starting >>> moveit_task_constructor_msgs
Starting >>> rviz_marker_tools
Starting >>> moveit_resources_pr2_description
Finished <<< moveit_common [1.50s]                           
Starting >>> moveit_resources_prbt_support
Finished <<< moveit_resources_panda_description [1.58s]      
Starting >>> moveit_resources_panda_moveit_config
--- stderr: launch_param_builder                             
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
---
Finished <<< launch_param_builder [1.98s]
Starting >>> rosparam_shortcuts
Finished <<< moveit_resources_pr2_description [2.10s]        
Finished <<< moveit_resources_fanuc_description [2.25s]      
Starting >>> moveit_resources_fanuc_moveit_config
Finished <<< moveit_resources_prbt_support [1.38s]           
Finished <<< moveit_resources_panda_moveit_config [1.33s]    
Finished <<< moveit_resources_fanuc_moveit_config [1.51s]        
Starting >>> moveit_resources
Finished <<< moveit_resources [1.42s]                            
Finished <<< rviz_marker_tools [15.3s]                             
Finished <<< srdfdom [26.7s]                                         
Starting >>> moveit_core
Starting >>> moveit_configs_utils       
--- stderr: moveit_configs_utils        
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
---
Finished <<< moveit_configs_utils [1.87s]
--- stderr: moveit_task_constructor_msgs
Traceback (most recent call last):
  File "/opt/ros/humble/share/rosidl_generator_py/cmake/../../../lib/rosidl_generator_py/rosidl_generator_py", line 8, in <module>
    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]: *** [moveit_task_constructor_msgs__py/CMakeFiles/moveit_task_constructor_msgs__py.dir/build.make:328: rosidl_generator_py/moveit_task_constructor_msgs/_moveit_task_constructor_msgs_s.ep.rosidl_typesupport_fastrtps_c.c] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:590: moveit_task_constructor_msgs__py/CMakeFiles/moveit_task_constructor_msgs__py.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< moveit_task_constructor_msgs [28.6s, exited with code 2]
Aborted  <<< rosparam_shortcuts [31.4s]            
Aborted  <<< moveit_core [6.80s]                              

Summary: 12 packages finished [34.8s]
  1 package failed: moveit_task_constructor_msgs
  2 packages aborted: moveit_core rosparam_shortcuts
  3 packages had stderr output: launch_param_builder moveit_configs_utils moveit_task_constructor_msgs
  35 packages not processed
JafarAbdi commented 2 years ago

Looks like you built your workspace once with rolling and then with humble, a clean build should resolve the issue

Nils-ChristianIseke commented 2 years ago

Thanks for your answer. Don't know how that happened :p. A clean build resolves the warning. But the build still fails. I updated the issue with the new backtrace.

JafarAbdi commented 2 years ago

What's your PYTHONPATH env-variable value?

GradyM2M commented 2 years ago

@Nils-ChristianIseke Hi, I have the same issue, any progress on this?

Nils-ChristianIseke commented 2 years ago

@GradyM2M For now, i decided to switch back to Ubuntu 20.04 and ROS Foxy at work, because i also had some trouble with Ubuntu 22.04. But I will try to reproduce this error on my private pc, as soon as i have some spare time.

vatanaksoytezer commented 2 years ago

Anyone still having this issue? The CI, my local installation and dockers have been pretty happy for some time.

GradyM2M commented 2 years ago

When I try to reinstall ros humble, the issue is gone. LOL

vatanaksoytezer commented 2 years ago

Closing the issue, then. Please feel free to re-open or open a new one, if you have other issues.