eProsima / Integration-Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to compile ROS2-SH on humble

leandropineda opened this issue · comments

I was able to compile the ROS2-SH on a foxy based docker container, but when compiling it for humble I got the following error:

$ colcon build --cmake-args -DCMAKE_CXX_FLAGS="-include /usr/include/c++/11/limits -include /usr/include/c++/11/thread" -DIS_ROS2_DISTRO=humble
...
Starting >>> is-ros2-mix-generator
--- stderr: is-ros2-mix-generator                         
CMake Error at /home/docker/dev_ws/install/is-core/lib/cmake/is-core/cmake/is_mix_generator.cmake:670 (message):
  Critical failure when trying to parse the package information of std_msgs:
  The python script output a list with 0 elements instead of 4.
Call Stack (most recent call first):
  /home/docker/dev_ws/install/is-core/lib/cmake/is-core/cmake/is_mix_generator.cmake:125 (_is_mix_find_package_info)
  cmake/is_ros2_rosidl_mix.cmake:69 (is_mix_generator)
  CMakeLists.txt:90 (is_ros2_rosidl_mix)
---
Failed   <<< is-ros2-mix-generator [1.11s, exited with code 1]

I understand that the script is failing to get information related to std_msgs, but those seem to be properly installed on the system:

docker@2e6de32c971a:~/dev_ws$ ls /opt/ros/humble/share/std_msgs/msg/
Bool.idl            ColorRGBA.idl          Float64.idl            Int16MultiArray.idl  Int64MultiArray.idl      MultiArrayLayout.idl  UInt32.idl            UInt8.idl
Bool.msg            ColorRGBA.msg          Float64.msg            Int16MultiArray.msg  Int64MultiArray.msg      MultiArrayLayout.msg  UInt32.msg            UInt8.msg
Byte.idl            Empty.idl              Float64MultiArray.idl  Int32.idl            Int8.idl                 String.idl            UInt32MultiArray.idl  UInt8MultiArray.idl
Byte.msg            Empty.msg              Float64MultiArray.msg  Int32.msg            Int8.msg                 String.msg            UInt32MultiArray.msg  UInt8MultiArray.msg
ByteMultiArray.idl  Float32.idl            Header.idl             Int32MultiArray.idl  Int8MultiArray.idl       UInt16.idl            UInt64.idl
ByteMultiArray.msg  Float32.msg            Header.msg             Int32MultiArray.msg  Int8MultiArray.msg       UInt16.msg            UInt64.msg
Char.idl            Float32MultiArray.idl  Int16.idl              Int64.idl            MultiArrayDimension.idl  UInt16MultiArray.idl  UInt64MultiArray.idl
Char.msg            Float32MultiArray.msg  Int16.msg              Int64.msg            MultiArrayDimension.msg  UInt16MultiArray.msg  UInt64MultiArray.msg

Might this be related to Ubuntu 22 python version?

commented

Have you seen this branch? main...ros2-typename

I wonder if it might be the solution to your problems.
Edit: nope. I tried the patch and it changed nothing.

commented

It's weird: if I run the script it's talking about manually, there's plenty of output on stdout when querying the std_msgs package.

↳ python3 ROS2-SH/utils/ros2-mix-generator/scripts/is_ros2_rosidl_find_package_info.py std_msgs
builtin_interfaces;/opt/ros/humble/share/std_msgs/msg/UInt64MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Bool.msg#/opt/ros/humble/share/std_msgs/msg/ColorRGBA.msg#/opt/ros/humble/share/std_msgs/msg/Float32MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Int16MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/ByteMultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Int64MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/UInt16MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Empty.msg#/opt/ros/humble/share/std_msgs/msg/UInt8.msg#/opt/ros/humble/share/std_msgs/msg/Char.msg#/opt/ros/humble/share/std_msgs/msg/Byte.msg#/opt/ros/humble/share/std_msgs/msg/Int32MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Float32.msg#/opt/ros/humble/share/std_msgs/msg/MultiArrayLayout.msg#/opt/ros/humble/share/std_msgs/msg/Float64.msg#/opt/ros/humble/share/std_msgs/msg/Int32.msg#/opt/ros/humble/share/std_msgs/msg/Float64MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/UInt32MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/UInt64.msg#/opt/ros/humble/share/std_msgs/msg/Int8.msg#/opt/ros/humble/share/std_msgs/msg/UInt8MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/UInt16.msg#/opt/ros/humble/share/std_msgs/msg/MultiArrayDimension.msg#/opt/ros/humble/share/std_msgs/msg/Int16.msg#/opt/ros/humble/share/std_msgs/msg/Int8MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Int64.msg#/opt/ros/humble/share/std_msgs/msg/UInt32.msg#/opt/ros/humble/share/std_msgs/msg/Header.msg#/opt/ros/humble/share/std_msgs/msg/String.msg;;/opt/ros/humble/share/std_msgs/msg/UInt64MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Bool.msg#/opt/ros/humble/share/std_msgs/msg/ColorRGBA.msg#/opt/ros/humble/share/std_msgs/msg/Float32MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Int16MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/ByteMultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Int64MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/UInt16MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Empty.msg#/opt/ros/humble/share/std_msgs/msg/UInt8.msg#/opt/ros/humble/share/std_msgs/msg/Char.msg#/opt/ros/humble/share/std_msgs/msg/Byte.msg#/opt/ros/humble/share/std_msgs/msg/Int32MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Float32.msg#/opt/ros/humble/share/std_msgs/msg/MultiArrayLayout.msg#/opt/ros/humble/share/std_msgs/msg/Float64.msg#/opt/ros/humble/share/std_msgs/msg/Int32.msg#/opt/ros/humble/share/std_msgs/msg/Float64MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/UInt32MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/UInt64.msg#/opt/ros/humble/share/std_msgs/msg/Int8.msg#/opt/ros/humble/share/std_msgs/msg/UInt8MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/UInt16.msg#/opt/ros/humble/share/std_msgs/msg/MultiArrayDimension.msg#/opt/ros/humble/share/std_msgs/msg/Int16.msg#/opt/ros/humble/share/std_msgs/msg/Int8MultiArray.msg#/opt/ros/humble/share/std_msgs/msg/Int64.msg#/opt/ros/humble/share/std_msgs/msg/UInt32.msg#/opt/ros/humble/share/std_msgs/msg/Header.msg#/opt/ros/humble/share/std_msgs/msg/String.msg#/opt/ros/humble/share/builtin_interfaces/msg/Time.msg#/opt/ros/humble/share/builtin_interfaces/msg/Duration.msg

To debug cmake we can use:

colcon build --packages-select is-ros2-mix-generator --cmake-args --trace-expand
less log/latest_build/is-ros2-mix-generator/stdout_stderr.log

Edit: the issue is the PYTHON_EXECUTABLE variable isn't set. Once I put this

set(PYTHON_EXECUTABLE "python3")

in the cmake file, it progressed passed this and ran into another error, clearing the build & instal artifacts fixed this.

ROS2-SH build on humble is since #186 successful as attested by CI