ROS2 Messages and Service Generation Problem [closed]

asked 2018-12-07 15:14:33 -0500

David Lu gravatar image

18.04/bouncy

I am generating a bunch of messages and one service in a package. It seemingly builds fine.

rosidl_generate_interfaces(
    ${PROJECT_NAME}
        msg/Path2D.msg
        ...
        msg/Point2D.msg
        srv/SwitchPlugin.srv
    DEPENDENCIES
        std_msgs
        geometry_msgs
)

However, when building a separate message package that depends on this one, i get the following error.

+++ Building 'dwb_msgs'
==> '. /home/dlu/ros2_ws/build/dwb_msgs/cmake__build.sh && /usr/bin/make cmake_check_build_system' in '/home/dlu/ros2_ws/build/dwb_msgs'
-- Found rosidl_default_generators: 0.5.0 (/opt/ros/bouncy/share/rosidl_default_generators/cmake)
-- Found ament_cmake_core: 0.5.1 (/opt/ros/bouncy/share/ament_cmake_core/cmake)
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.7", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Override CMake install command with custom implementation using symlinks instead of copying resources
-- Found geometry_msgs: 0.5.1 (/opt/ros/bouncy/share/geometry_msgs/cmake)
-- Found nav_2d_msgs: 0.1.4 (/home/dlu/ros2_ws/install/nav_2d_msgs/share/nav_2d_msgs/cmake)
-- Found nav_msgs: 0.5.1 (/opt/ros/bouncy/share/nav_msgs/cmake)
CMake Error at /opt/ros/bouncy/share/rosidl_typesupport_c/cmake/rosidl_typesupport_c_generate_interfaces.cmake:55 (message):
  Target dependency
  '/home/dlu/ros2_ws/install/nav_2d_msgs/share/nav_2d_msgs/srv/SwitchPlugin_Request.msg'
  does not exist
Call Stack (most recent call first):
  /opt/ros/bouncy/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:38 (include)
  /opt/ros/bouncy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:169 (ament_execute_extensions)
  CMakeLists.txt:10 (rosidl_generate_interfaces)


-- Configuring incomplete, errors occurred!

I've never seen this before with the service generating a Request message, but it makes sense. How do I fix it?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by David Lu
close date 2019-09-19 14:06:12.062215