Ask Your Question
0

ROS2 Build Action Tutorial "Colcon build Failed"

asked 2020-01-28 13:12:43 -0600

vexity gravatar image

updated 2020-01-28 13:13:44 -0600

gvdhoorn gravatar image

I'm currently following ROS2 Build Action tutorial: link text, and I'm stuck with the colcon build, the tutorial asks to add some lines to my CMakeLists and package files before building the package (The lines are encased with comments). Yet I'm getting errors that suggests I should remove some lines. I'll provide the errors and the files.

Error 1:

[0.312s] WARNING:colcon.colcon_core.package_identification:Failed to parse ROS package manifest in 'src/action_tutorials': Error(s) in package 'src/action_tutorials/package.xml':
Error(s):
- The manifest of package "action_tutorials" (with format version 2) must not contain the following tags: member_of_group
Starting >>> action_tutorials
--- stderr: action_tutorials                         
Error parsing '/home/jose/action_ws/src/action_tutorials/package.xml':
Traceback (most recent call last):
  File "/opt/ros/crystal/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 141, in <module>
    main()
  File "/opt/ros/crystal/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 52, in main
    raise e
  File "/opt/ros/crystal/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 49, in main
    args.package_xml.read(), filename=args.package_xml.name)
  File "/usr/lib/python3/dist-packages/catkin_pkg/package.py", line 771, in parse_package_string
    raise InvalidPackage('Error(s):%s' % (''.join(['\n- %s' % e for e in errors])), filename)
catkin_pkg.package.InvalidPackage: Error(s) in package '/home/jose/action_ws/src/action_tutorials/package.xml':
Error(s):
- The manifest of package "action_tutorials" (with format version 2) must not contain the following tags: member_of_group
CMake Error at /opt/ros/crystal/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:94 (message):
  execute_process(/usr/bin/python3
  /opt/ros/crystal/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py
  /home/jose/action_ws/src/action_tutorials/package.xml
  /home/jose/action_ws/build/action_tutorials/ament_cmake_core/package.cmake)
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/crystal/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:49 (_ament_package_xml)
  /opt/ros/crystal/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:223 (ament_package_xml)
  CMakeLists.txt:26 (rosidl_generate_interfaces)


---
Failed   <<< action_tutorials   [ Exited with code 1 ]

Summary: 0 packages finished [1.09s]
  1 package failed: action_tutorials
  1 package had stderr output: action_tutorials

Error 2: Occurs when I remove such tag

CMake Error at /opt/ros/crystal/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:226 (message):
  Packages installing interfaces must include
  '<member_of_group>rosidl_interface_packages</member_of_group>' in their
  package.xml
Call Stack (most recent call first):
  CMakeLists.txt:26 (rosidl_generate_interfaces)
---
Failed   <<< action_tutorials   [ Exited with code 1 ]

Summary: 0 packages finished [0.97s]
  1 package failed: action_tutorials
  1 package had stderr output: action_tutorials

Files in question:

CMakeLists.txt

cmake_minimum_required(VERSION 3.5)
project(action_tutorials)

# Default to C99
if(NOT CMAKE_C_STANDARD)
 set(CMAKE_C_STANDARD 99)
endif()

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
 set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)

##############################################
find_package(rosidl_default_generators REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
   "action/Fibonacci.action"
)
#############################################

if(BUILD_TESTING)
  find_package(ament_lint_auto REQUIRED)
  # the following line skips the linter which checks for copyrights
  # uncomment the line when a copyright and license is not present in all source files
  #set ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-01-28 13:17:18 -0600

gvdhoorn gravatar image

The error message says this:

Error(s) in package 'src/action_tutorials/package.xml':
Error(s):
- The manifest of package "action_tutorials" (with format version 2) must not contain the following tags: member_of_group

And indeed, we see you have a member_of_group element in your package manifest (as you should, otherwise the second error is shown).

But member_of_group (and several other elements) are only supported in version 3 manifests. See REP 149: Package Manifest Format Three Specification.

You have specced a version 2 manifest:

<package format="2">

For this to work, you should change that 2 in a 3.

edit flag offensive delete link more

Comments

I did as instructed, now I'm encountering this error:

Service interface 'unique_identifier_msgs/UUID' contains an unknown field type: unique_identifier_msgs/UUID action_goal_id

Message interface 'unique_identifier_msgs/UUID' contains an unknown field type: unique_identifier_msgs/UUID action_goal_id

Each one has a couple more error lines, but it doesn't fit in this comment, is there a possibility I can contact you somewhere else?

vexity gravatar imagevexity ( 2020-01-30 09:25:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-01-28 13:12:43 -0600

Seen: 30 times

Last updated: Jan 28