colcon / colcon-ros

Extension for colcon to support ROS packages
http://colcon.readthedocs.io
Apache License 2.0
13 stars 26 forks source link

Strange error when building a custom-message package named "abc" #90

Closed agadkari closed 4 years ago

agadkari commented 4 years ago

I have custom message package named "abc" that contains a message "MyMsg.msg". Another custom message package named "use_abc_msgs" contains a message "UseMyMsg.msg" that refers to "abc/MyMsg". I am seeing strange python errors when building this simple hierarchical message.

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/ros2share/ament_cmake_core/cmake/ament_cmake_package_templates-extras.cmake:41 (message):
  execute_process(C:/Python37/python.exe
  C:/dev/ros2share/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/ros2share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake:38 (include)
  C:/dev/ros2share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake:15 (find_package)
  C:/dev/ros2share/ament_cmake/cmake/ament_cmakeConfig.cmake:38 (include)
  CMakeLists.txt:19 (find_package)
-

I don't understand how Python Abstract Base Classes are invoked here. I found a similar posting related to Catkin but did not see a satisfactory solution. I have attached a zip archive, test_custom_msg.zip, that shows this issue.

System environment: OS: Windows 10 ROS 2: Dashing (built from sources) CMake: 3.14.7 Python: 3.7.2

Reproduction steps:

  1. Extract the zip-archive
  2. Change folder to the extracted archive
  3. Run local_setup.bat or setup.bash (I'm sure this is platform independent).
  4. Run "colcon build --merge-install"

Any guidance will be greatly appreciated.

Thanks.

dirk-thomas commented 4 years ago

I am not sure if you have seen the ROS support guidelines but we kindly ask to raise questions like this on answers.ros.org instead.

The rational for asking all kind of questions in a single place is:

Therefore I will close this ticket here for now. If you have asked your question on answers.ros.org please feel free to add a link to the question to this ticket so that future readers can find the related question.

agadkari commented 4 years ago

Thanks Dirk! Asked the question on the answers.ros.org forum.