Adding dependencies to a package
Does the catkin_make
process automatically download packages identified as dependencies ???
I have a package which makes use of the rosbridge package.
I defined the find_package section of my CMakeLists.txt like so :
find_package(catkin REQUIRED COMPONENTS
rosbridge_server
rospy
)
And I added the following lines to my package.xml :
<build_export_depend>rosbridge_server</build_export_depend>
<exec_depend>rosbridge_server</exec_depend>
However, I get the following when I execute catkin_make :
.
.
.
-- Could NOT find rosbridge_server (missing: rosbridge_server_DIR)
-- Could not find the required component 'rosbridge_server'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "rosbridge_server"
with any of the following names:
rosbridge_serverConfig.cmake
rosbridge_server-config.cmake
Add the installation prefix of "rosbridge_server" to CMAKE_PREFIX_PATH or
set "rosbridge_server_DIR" to a directory containing one of the above
files. If "rosbridge_server" provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
sweepbot/Sweeper/sweepbot_test2/CMakeLists.txt:10 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/sisko/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/sisko/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:320: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
I found this question but it's answer is out of date.
Please do not ask multiple questions in a single post.
That's not how this site works. It's a Q&A site, which works best with a 1-to-1 ratio of questions to answers. Similar to how StackExchange et al. work.
It'd be best if you edit your current question and decide which of your questions you want to keep in this one.
I would also suggest to see whether #q252478 demystifies the how-to-build-packages-from-sources question.
The fact they are "your own" packages, does not change the workflow (except of course you may not need to
git clone
them first).Hello @gvdhoom. There seems to be a misunderstanding. My question may have multiple facets to it but they are all related to the same issue of adding dependencies to ros packages. I merely added more information from different perspectives.
this is a different question than "does catkin download dependencies" and should be asked in a separate post.
Thank you @gvdboom: The link you provided referred to
rosdep
which does exactly what I needed and though catkin_make might. If you care to provided your input as an answer, I'll be happy to accept it.