Skip to content

Error: "add_action_files() directory not found", but msg and srv building fine #29

@autonomobil

Description

@autonomobil

The ros package has the following structure:

custom_msg_pkg
├── CMakeLists.txt  
├── package.xml                               
├── action
│   └── some_action.action                 # Action files
├── srv
│   └── some_service.srv                 # Service files
├── msg
│   └── some_message.msg                 # Messages files 

When building (catkin build custom_msg_pkg) I'm getting the following error:

Errors     << custom_msg_pkg:check /home/user/catkin_ws/logs/custom_msg_pkg/build.check.003.log                                                                                                                                                                   
CMake Error at /opt/ros/melodic/share/actionlib_msgs/cmake/actionlib_msgs-extras.cmake:20 (message):
  add_action_files() directory not found:
  /home/user/catkin_ws/src/project/custom_msg_pkg//home/user/catkin_ws/src/project/custom_msg_pkg/action
Call Stack (most recent call first):
  /opt/ros/melodic/share/mrt_cmake_modules/cmake/mrt_cmake_modules-macros.cmake:429 (add_action_files)
  CMakeLists.txt:46 (mrt_add_action_files)


make: *** [cmake_check_build_system] Error 1
cd /home/user/catkin_ws/build/custom_msg_pkg; catkin build --get-env custom_msg_pkg | catkin env -si  /usr/bin/make cmake_check_build_system; cd -
.......................................................................................................................................................................................................................................................
Failed     << custom_msg_pkg:check          [ Exited with code 2 ]                                                                                                                                                                                           
Failed    <<< custom_msg_pkg                [ 0.6 seconds ]                                                                                                                                                                                                  
[build] Summary: 0 of 1 packages succeeded.                                                                                                                                                                                                            
[build]   Ignored:   22 packages were skipped or are blacklisted.                                                                                                                                                                                      
[build]   Warnings:  None.                                                                                                                                                                                                                             
[build]   Abandoned: None.                                                                                                                                                                                                                             
[build]   Failed:    1 packages failed.                                                                                                                                                                                                                
[build] Runtime: 0.7 seconds total.  

If I comment out mrt_add_action_files(action) in CMakeLists.txt everything builds fine.

Does it have to do something with this difference:

if(_ROS_SERVICE_FILES)
add_service_files(FILES ${_ROS_SERVICE_FILES} DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/${folder_name}")

vs.

if(_ROS_ACTION_FILES)
add_action_files(FILES ${_ROS_ACTION_FILES} DIRECTORY "${folder_name}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions