Robotics StackExchange | Archived questions

ros2_ws build fail

Steps to reproduce issue

I tried to build ros2ws of master version in order to use nodeoption in rclcpp (crystal version doesn't have)

previous steps
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws
wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
vcs import src < ros2.repos

when ros2_ws is built, the error came up as below

song@song-Precision-T1700:~/ros2_ws$ colcon build --symlink-install
Starting >>> ament_package
Starting >>> ament_flake8
Starting >>> fastcdr
Starting >>> poco_vendor
Starting >>> ament_cppcheck
Starting >>> tinydir_vendor
Starting >>> gtest_vendor
Starting >>> osrf_pycommon
Finished <<< ament_package [1.10s]                            
Finished <<< ament_flake8 [1.11s]
Starting >>> ament_cmake_core
Starting >>> ament_pep257                                          
Finished <<< ament_cppcheck [1.47s]                             
Finished <<< poco_vendor [1.47s]
Finished <<< fastcdr [1.47s]
Finished <<< tinydir_vendor [1.48s]
Starting >>> fastrtps
Starting >>> tinyxml2_vendor
Starting >>> tinyxml_vendor
Starting >>> urdfdom_headers
Finished <<< gtest_vendor [1.60s]                                    
Starting >>> gmock_vendor
Finished <<< osrf_pycommon [1.67s]                            
Starting >>> orocos_kdl
Finished <<< ament_cmake_core [0.55s]
Starting >>> ament_cmake_test
Finished <<< tinyxml2_vendor [0.31s]                         
Starting >>> ament_cmake_libraries
Finished <<< tinyxml_vendor [0.32s]                           
Finished <<< urdfdom_headers [0.33s]
Starting >>> ament_cmake_export_libraries
Starting >>> ament_cmake_include_directories
Finished <<< gmock_vendor [0.28s]
Starting >>> ament_cmake_export_definitions
Finished <<< ament_cmake_test [0.26s]                         
Starting >>> ament_cmake_export_include_directories
Finished <<< ament_pep257 [0.97s]                             
Starting >>> ament_cmake_export_link_flags
Finished <<< ament_cmake_libraries [0.37s]                         
Starting >>> ament_cmake_export_dependencies
Finished <<< ament_cmake_export_libraries [0.39s]                  
Starting >>> ament_cmake_python
Finished <<< ament_cmake_export_definitions [0.40s]
Finished <<< ament_cmake_include_directories [0.43s]
Starting >>> ament_cmake_export_interfaces
Starting >>> ament_cmake_target_dependencies
Finished <<< orocos_kdl [0.65s]
Finished <<< ament_cmake_export_include_directories [0.35s]        
Starting >>> ament_copyright
Starting >>> ament_index_python
Finished <<< ament_cmake_export_link_flags [0.85s]                 
Starting >>> ament_lint_auto
Finished <<< ament_cmake_export_dependencies [0.83s]
Starting >>> ament_cmake_gtest
Finished <<< ament_cmake_export_interfaces [0.75s]                 
Starting >>> ament_cmake_pytest
Finished <<< ament_cmake_python [0.80s]
Starting >>> osrf_testing_tools_cpp
Finished <<< ament_cmake_target_dependencies [0.81s]
Starting >>> ament_cmake                                           
Finished <<< ament_copyright [0.86s]
Starting >>> ament_lint_cmake
Finished <<< ament_index_python [1.23s]                            
Starting >>> ament_cpplint
Finished <<< ament_lint_auto [0.63s]
Starting >>> ament_xmllint
Finished <<< ament_cmake_gtest [1.03s]                             
Finished <<< ament_cmake_pytest [0.98s]
Finished <<< osrf_testing_tools_cpp [0.95s]
Starting >>> launch                                                
Starting >>> ament_cmake_gmock
Starting >>> ament_pep8
Finished <<< ament_cmake [1.27s]
Finished <<< ament_lint_cmake [1.24s]
Starting >>> ament_cmake_lint_cmake
Starting >>> uncrustify_vendor
Finished <<< ament_xmllint [1.52s]                                 
Finished <<< ament_cpplint [1.57s]
Starting >>> libyaml_vendor                                        
Starting >>> console_bridge_vendor
Finished <<< ament_cmake_gmock [0.95s]                             
Starting >>> libcurl_vendor
Finished <<< launch [1.05s]                                        
Starting >>> ament_cmake_auto
Finished <<< uncrustify_vendor [1.01s]                             
Starting >>> ament_uncrustify
Finished <<< ament_cmake_lint_cmake [1.06s]
Starting >>> ament_cmake_copyright
Finished <<< libyaml_vendor [0.37s]
Starting >>> rviz_assimp_vendor                                    
Finished <<< ament_pep8 [1.48s]                                    
Starting >>> rviz_ogre_vendor
Finished <<< libcurl_vendor [0.61s]
Starting >>> yaml_cpp_vendor
Finished <<< ament_cmake_auto [0.61s]                              
Starting >>> ament_pyflakes
Finished <<< ament_cmake_copyright [1.66s]                         
Starting >>> ament_cmake_cppcheck
Finished <<< ament_uncrustify [1.73s]                              
Finished <<< console_bridge_vendor [2.02s]
Finished <<< rviz_assimp_vendor [1.37s]
Finished <<< ament_pyflakes [1.18s]
Starting >>> ament_cmake_cpplint
Starting >>> ament_cmake_uncrustify
Starting >>> ament_cmake_flake8
Starting >>> ament_cmake_pep257
Finished <<< ament_cmake_cpplint [0.22s]                           
Starting >>> ament_cmake_xmllint
Finished <<< ament_cmake_cppcheck [0.31s]                          
Starting >>> urdfdom
Finished <<< ament_cmake_uncrustify [0.26s]
Starting >>> ament_clang_format
Finished <<< ament_cmake_flake8 [0.26s]
Finished <<< ament_cmake_pep257 [0.26s]
Starting >>> ament_pclint
Starting >>> test_osrf_testing_tools_cpp
Finished <<< ament_cmake_xmllint [0.94s]                           
Starting >>> ament_lint_common                                      
Finished <<< ament_clang_format [1.04s]                             
Starting >>> ros_environment
Finished <<< ament_lint_common [0.30s]                              
Starting >>> rosidl_adapter
Finished <<< ament_pclint [1.55s]                                   
Starting >>> rosidl_typesupport_interface
Finished <<< rosidl_adapter [0.43s]                                 
Starting >>> rosidl_parser
Finished <<< rosidl_typesupport_interface [0.45s]                   
Starting >>> fastrtps_cmake_module
Finished <<< ros_environment [1.09s]                                
Starting >>> connext_cmake_module
Finished <<< rosidl_parser [1.03s]                                  
Starting >>> rosidl_actions
Finished <<< fastrtps_cmake_module [1.69s]                          
Starting >>> opensplice_cmake_module
Finished <<< connext_cmake_module [1.82s]                           
Starting >>> rcpputils
Finished <<< opensplice_cmake_module [1.68s]                         
Starting >>> rmw_implementation_cmake
Finished <<< rmw_implementation_cmake [0.86s]                        
Starting >>> python_cmake_module
Finished <<< rcpputils [2.56s]                                       
Starting >>> ament_cmake_ros
Finished <<< python_cmake_module [0.54s]                             
Starting >>> python_qt_binding
Finished <<< ament_cmake_ros [0.39s]                                 
Starting >>> ament_index_cpp
Finished <<< python_qt_binding [1.04s]                               
Starting >>> qt_gui
Finished <<< rosidl_actions [6.12s]                                  
Starting >>> rosidl_cmake
Finished <<< ament_index_cpp [2.28s]                                 
Starting >>> launch_testing
Finished <<< rosidl_cmake [1.01s]                                    
Starting >>> rosidl_generator_c
--- stderr: rosidl_generator_c                                       
Traceback (most recent call last):
  File "/home/song/ros2_ws/src/ros2/rosidl/rosidl_generator_c/bin/rosidl_generator_c", line 40, in <module>
    sys.exit(main())
  File "/home/song/ros2_ws/src/ros2/rosidl/rosidl_generator_c/bin/rosidl_generator_c", line 35, in main
    args.generator_arguments_file,
  File "/opt/ros/crystal/lib/python3.6/site-packages/rosidl_generator_c/__init__.py", line 52, in generate_c
    for ros_interface_file in args['ros_interface_files']:
KeyError: 'ros_interface_files'
make[2]: *** [rosidl_generator_c/rosidl_generator_c/msg/bool.h] Error 1
make[1]: *** [CMakeFiles/rosidl_generator_c_interfaces__rosidl_generator_c.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< rosidl_generator_c [ Exited with code 2 ]
Aborted  <<< qt_gui                                 
Aborted  <<< test_osrf_testing_tools_cpp            
Aborted  <<< urdfdom                                
Aborted  <<< yaml_cpp_vendor                        
Aborted  <<< launch_testing                         
Aborted  <<< fastrtps                               
Aborted  <<< rviz_ogre_vendor                                                      

Summary: 73 packages finished [5min 15s]
  1 package failed: rosidl_generator_c
  7 packages aborted: fastrtps launch_testing qt_gui rviz_ogre_vendor test_osrf_testing_tools_cpp urdfdom yaml_cpp_vendor
  1 package had stderr output: rosidl_generator_c
  156 packages not processed

Would you like let me know how to figure out this error ?

Thank you

Asked by MSS on 2019-04-11 04:25:24 UTC

Comments

Answers

It looks like you are trying to mix some packages from Crystal with some packages from their master branch. That is not a viable combination.

You need to build all packages from the master branch - or more precisely: use all repositories from the branch referenced from the ros2.repos file on the master branch (https://github.com/ros2/ros2/blob/master/ros2.repos).

Asked by Dirk Thomas on 2019-04-11 09:30:09 UTC

Comments