Ask Your Question
0

Colcon build failed to build nav2_util

asked 2020-09-17 14:35:11 -0500

PLui gravatar image

updated 2020-11-04 12:57:06 -0500

gvdhoorn gravatar image

Hi,

I am running on Ubuntu 20.04 ROS Foxy.

Following the instruction on navigation tutorial (https://navigation.ros.org/build_inst...) to build navigation stack. I downloaded the files from the repo git clone https://github.com/ros-planning/navig... --branch foxy-devel

After running colcon build command, the building process failed while trying to build nav2_util with the following error message:

--- stderr: nav2_util                                
In file included from /opt/ros/foxy/include/test_msgs/action/fibonacci.hpp:9,
                 from /home/paulolui/navigation2_ws/src/navigation2/nav2_util/test/test_actions.cpp:22:
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:23:25: error: expected initializer before ‘<’ token
   23 | inline const char * name<test_msgs::action::Fibonacci_Goal>()
      |                         ^
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:52:25: error: expected initializer before ‘<’ token
   52 | inline const char * name<test_msgs::action::Fibonacci_Result>()
      |                         ^
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:81:25: error: expected initializer before ‘<’ token
   81 | inline const char * name<test_msgs::action::Fibonacci_Feedback>()
      |                         ^
In file included from /opt/ros/foxy/include/test_msgs/action/fibonacci.hpp:9,
                 from /home/paulolui/navigation2_ws/src/navigation2/nav2_util/test/test_actions.cpp:22:
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:116:25: error: expected initializer before ‘<’ token
  116 | inline const char * name<test_msgs::action::Fibonacci_SendGoal_Request>()
      |                         ^
In file included from /opt/ros/foxy/include/test_msgs/action/fibonacci.hpp:9,
                 from /home/paulolui/navigation2_ws/src/navigation2/nav2_util/test/test_actions.cpp:22:
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:149:25: error: expected initializer before ‘<’ token
  149 | inline const char * name<test_msgs::action::Fibonacci_SendGoal_Response>()
      |                         ^
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:178:25: error: expected initializer before ‘<’ token
  178 | inline const char * name<test_msgs::action::Fibonacci_SendGoal>()
      |                         ^
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:238:25: error: expected initializer before ‘<’ token
  238 | inline const char * name<test_msgs::action::Fibonacci_GetResult_Request>()
      |                         ^
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:272:25: error: expected initializer before ‘<’ token
  272 | inline const char * name<test_msgs::action::Fibonacci_GetResult_Response>()
      |                         ^
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:301:25: error: expected initializer before ‘<’ token
  301 | inline const char * name<test_msgs::action::Fibonacci_GetResult>()
      |                         ^
/opt/ros/foxy/include/test_msgs/action/detail/fibonacci__traits.hpp:364:25: error: expected initializer before ‘<’ token
  364 | inline const char * name<test_msgs::action::Fibonacci_FeedbackMessage>()
      |                         ^
make[2]: *** [test/CMakeFiles/test_actions.dir/build.make:63: test/CMakeFiles/test_actions.dir/test_actions.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:443: test/CMakeFiles/test_actions.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:141: all] Error 2
---
Failed   <<< nav2_util [38.2s, exited with code 2]

Summary: 6 packages finished [44.3s]
  1 package failed: nav2_util
  1 package had stderr output: nav2_util
  22 packages not processed
edit retag flag offensive close merge delete

Comments

I'm having the same issue, did you figure this out?

mrunaljsarvaiya gravatar image mrunaljsarvaiya  ( 2020-10-12 21:51:02 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-11-04 12:12:05 -0500

zultron gravatar image

This build failure is in the tests, which aren't critical to building the nav2_util package. Comment out the three lines configuring the broken test_actions.cpp test in nav2_util/test/CMakeLists.txt and try again. (I actually haven't tried this repo, but fixed a similar issue in the ros-controls/realtime_tools repo; it's possible this isn't the only issue.)

This problem actually originates in a maze of little problems; here's a summary and links to the gory details:

  • The compiler error is a result of the fibonacci action headers in the ros-foxy-test-msgs Debian package being generated by a newer version of the rosidl_runtime_cpp ROS package (v. 1.1.0+) than the actual ros-foxy-rosidl-runtime-cpp package currently shipped in Foxy (v. 1.0.1)
  • It's a miracle the fibonacci action even exists in the ros-foxy-test-msgs v. 1.0.0 package, given that the now-obsolete action was removed from the test_msgs source in git tag 0.7.2
  • Now there are issues in the ros-planning/navigation2 repo and ros-controls/realtime_tools repo noting that the obsolete action needs to be removed in ROS2 branches to avoid build failures
edit flag offensive delete link more

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-09-17 14:35:11 -0500

Seen: 217 times

Last updated: Nov 04 '20