ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

ROS2 Build Action Tutorial "Colcon build Failed"

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

vexity gravatar image

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

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
1

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

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 image vexity  ( 2020-01-30 09:25:01 -0500 )edit

@gvdhoorn Clearly, we don't have the experience you do. You've told us what went wrong but, could you please tell us how to solve it? Thanks in advance.

ianscottmoyes gravatar image ianscottmoyes  ( 2021-02-11 16:40:25 -0500 )edit

@ianscottmoyes Please don't post answers that are not answers. I've converted your answer to a comment. For more, please see the support guidelines: http://wiki.ros.org/Support

jarvisschultz gravatar image jarvisschultz  ( 2021-02-11 17:32:54 -0500 )edit

@ianscottmoyes: I believe I did:

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

we don't know whether that fixed things though, as the OP never confirmed it was the solution.

gvdhoorn gravatar image gvdhoorn  ( 2021-02-12 00:09:21 -0500 )edit

I commented the result, I said it didn’t fix anything and I was still getting errors. I asked if I could contact you @gvdhoorn but I didn’t get a response back. Ultimately, I gave up on this endeavor since nothing I did would fix the errors.

vexity gravatar image vexity  ( 2021-02-12 06:45:59 -0500 )edit

Your comment under my answer seems to suggest changing the version of the package manifest actually did work.

You then report new problems, which should not be discussed in the same question, but for which you should post a new question.

I asked if I could contact you @gvdhoorn but I didn’t get a response back

I never respond to such requests, as 1) that's not how a public forum like ROS Answers is supposed to work, and 2) I don't want to do that. I'm happy to help on ROS Answers. I'm not a private troubleshooter.

gvdhoorn gravatar image gvdhoorn  ( 2021-02-12 10:08:06 -0500 )edit

I'm sorry, we're talking at cross purposes.

I didn't type a 2, or a 3.

I typed: colcon build

As instructed here: https://index.ros.org/doc/ros2/Tutori...

and got the error message mentioned in this post.

So, I typed. sudo apt install python3-colcon-common-extensions

As instructed here: https://index.ros.org/doc/ros2/Tutori...

& it doesn't change anything If you could please tell me how t solve this I would be very grateful?

Thanks in advance.

ianscottmoyes gravatar image ianscottmoyes  ( 2021-02-12 10:25:06 -0500 )edit
1

Ok, then I believe you should not be posting here.

The fact that you get a similar error message does not mean you're encountering the same problem.

Please post a new question, and clearly explain what you're doing and what goes wrong.

And include verbatim copy-pastes of error messages you see on the console (do not post screenshots).

gvdhoorn gravatar image gvdhoorn  ( 2021-02-12 11:39:47 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 7,575 times

Last updated: Jan 28 '20