ROS 2 custom message build error "abc" package
Hello,
I am testing creation of custom message packages in ROS 2 with colcon tools.
I have 2 test packages:
- abc/MyMsg.msg - custom message package named "abc" that contains a message "MyMsg.msg"
- use_abc_msg/UseMyMsg.msg - custom message package named "use_abc_msgs" contains a message "UseMyMsg.msg" that refers to "abc/MyMsg".
I get strange python errors when building this simple hierarchy of custom message packages. Errors are shown below:
Starting >>> abc [Processing: abc] Finished <<< abc [38.7s] Starting >>> use_abc_msgs --- stderr: use_abc_msgs Fatal Python error: init_sys_streams: can't initialize sys standard streams Traceback (most recent call last): File "C:\Python37\lib\io.py", line 72, in <module> **AttributeError: module 'abc' has no attribute 'ABCMeta'** CMake Error at C:/dev/ros2/share/ament_cmake_core/cmake/ament_cmake_package_templates-extras.cmake:41 (message): execute_process(C:/Python37/python.exe C:/dev/ros2/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py C:/test/build/use_abc_msgs/ament_cmake_package_templates/templates.cmake) **returned error code Exit code 0xc0000409** Call Stack (most recent call first): C:/dev/ros2/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake:38 (include) C:/dev/ros2/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake:15 (find_package) C:/dev/ros2/share/ament_cmake/cmake/ament_cmakeConfig.cmake:38 (include) CMakeLists.txt:19 (find_package)
I don't understand how Python Abstract Base Classes are invoked.
I found a similar posting related to ROS 1 Catkin, but did not see a satisfactory solution.
System environment
Operating System: Windows 10
ROS 2 version: Dashing (built from sources)
CMake version: 3.14.7
Python version: 3.7.2
I have attached the zip archive test_custom_msg.zip that shows this issue:
Reproduction steps:
- Extract the zip-archive.
- Change folder to the extracted archive.
- Run local_setup.bat or setup.bash for ROS 2 (I'm sure this is platform independent).
- Run "colcon build --merge-install".
Any guidance will be greatly appreciated.
Thanks.