Could not find a package configuration file - Custom ROS Package
Hi all,
I am using ros_melodic
with two different custom package namely ugv_ik & ugv_lcu for my application, among which ugv_ik package uses one of the message files of ugv_lcu.
While I try building my workspace I am getting the following error.
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "ugv_lcu" with any
of the following names:
ugv_lcuConfig.cmake
ugv_lcu-config.cmake
Add the installation prefix of "ugv_lcu" to CMAKE_PREFIX_PATH or set
"ugv_lcu_DIR" to a directory containing one of the above files. If
"ugv_lcu" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:10 (find_package)"
I knew this problem has occured earlier for others too but what I have noticed so far is the same error has occured for standard packages and can be cleared by installing that particular package.
But how to fix this error in case of a customized ros package?
I have inculded the package name ugv_lcu in the CMakeList.txt
of ugv_ik like given below:
find_package(catkin REQUIRED COMPONENTS
ugv_lcu
roscpp
std_msgs
)
generate_messages(
DEPENDENCIES
std_msgs
ugv_lcu
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ugv_ik
CATKIN_DEPENDS roscpp std_msgs ugv_lcu
DEPENDS system_lib
)
And this is my package.xml
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<depend>geometry_msgs</depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>message_runtime</exec_depend>
Kindly let me know, what am I missing and how to fix this issue.