I’m trying to compile my ‘actions_quiz’ package that I created for the Unit 9 quiz of the ROS basics Python course. However, it keeps giving me an error indicating that it cannot find an “action” folder within the ‘src’ folder of ‘catkin_ws’. Following is the output from the terminal when I used ‘catkin_make’:
user:~/catkin_ws$ catkin_make
Base path: /home/user/catkin_ws
Source space: /home/user/catkin_ws/src
Build space: /home/user/catkin_ws/build
Devel space: /home/user/catkin_ws/devel
Install space: /home/user/catkin_ws/installRunning command: “make cmake_check_build_system” in “/home/user/catkin_ws/build”
– Using CATKIN_DEVEL_PREFIX: /home/user/catkin_ws/devel
– Using CMAKE_PREFIX_PATH: /home/user/catkin_ws/devel;/home/simulations/public_sim_ws/devel;/opt/ros/noetic
– This workspace overlays: /home/user/catkin_ws/devel;/home/simulations/public_sim_ws/devel;/opt/ros/noetic
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.8.5”, minimum required is “3”)
– Using PYTHON_EXECUTABLE: /usr/bin/python3
– Using Debian Python package layout
– Using empy: /usr/lib/python3/dist-packages/em.py
– Using CATKIN_ENABLE_TESTING: ON
– Call enable_testing()
– Using CATKIN_TEST_RESULTS_DIR: /home/user/catkin_ws/build/test_results
– Forcing gtest/gmock from source, though one was otherwise available.
– Found gtest sources under ‘/usr/src/googletest’: gtests will be built
– Found gmock sources under ‘/usr/src/googletest’: gmock will be built
– Found PythonInterp: /usr/bin/python3 (found version “3.8.5”)
– Using Python nosetests: /usr/bin/nosetests3
– catkin 0.8.9
– BUILD_SHARED_LIBS is on
– Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at /opt/ros/noetic/share/actionlib_msgs/cmake/actionlib_msgs-extras.cmake:20 (message):
add_action_files() directory not found: /home/user/catkin_ws/src/action
Call Stack (most recent call first):
CMakeLists.txt:69 (add_action_files)– Configuring incomplete, errors occurred!
See also “/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/user/catkin_ws/build/CMakeFiles/CMakeError.log”.
make: *** [Makefile:320: cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed
I guess there is supposed to be an “/home/user/catkin_ws/src/action” folder. But my workspace doesn’t seem to have one. The only “action” folder I have is the one I created within my package to define the custom action message that I need to use.
However, I suspect there might be something wrong in the way I modified my ‘CMakeLists.txt’ and ‘package.xml’ files. For reference, these are as follows:
CMakeLists.txt:
cmake_minimum_required(VERSION 3.0.2)
project(actions_quiz)
find_package(catkin REQUIRED COMPONENTS
std_msgs
actionlib_msgs
)
add_action_files(
FILES
CustomActionMsg.action
)
generate_messages(
DEPENDENCIES
std_msgs
actionlib_msgs
)
catkin_package(
CATKIN_DEPENDS
rospy
)
include_directories(
${catkin_INCLUDE_DIRS}
)
package.xml:
<?xml version="1.0"?>
<package format="2">
<name>actions_quiz</name>
<version>0.0.0</version>
<description>The actions_quiz package</description>
<maintainer email="user@todo.todo">user</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>actionlib_msgs</build_depend>
<build_depend>actionlib</build_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<build_export_depend>actionlib_msgs</build_export_depend>
<build_export_depend>actionlib</build_export_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>actionlib_msgs</exec_depend>
<exec_depend>actionlib</exec_depend>
<export>
<!-- Other tools can request additional information be placed here -->
</export>
</package>
Is there anything that stands out here that could be wrong?