ROS - find_package - MSG in other local package
Hello, I work on ROS and I am blocked in CMAKE step. So explain
build
devel
src
package_a
node_a
source
node_a.cpp
CMakeList.txt
package.xml
package_b
msg
msg_between_a_b.msg
node_b
source
node_b.cpp
CMakeList.txt
package.xml
I am blocked in the step of CMakeList.txt for package_a. Package a need to know the message defined in package_b.
Error message from TERM console.
Add the installation prefix of "package_b" to CMAKE_PREFIX or set "package_b_DIR" to a directory containing one of the above files. If "package_b" provides a separate development package or SDK, be sure it has been installed.
I am (very) interesting of "package_b_DIR".
That is what I write in CMalkeList.txt:
(#) SEARCH package that already EXIST in /opt/ros find_package(catkin REQUIRED COMPONENTS message_generation rostime roscpp std_msgs rosconsole roscpp_serialization)
(#) Add package PACKAGE_B (usefull) for MSG find_package(catkin REQUIRED COMPONENTS package_b)
Very very thanks in advance !
What you post is not the error message, but a general remark about a possible(!) solution. I'm not quite sure what you are trying to do, but the general, ROS-way idea is the following:
*.msg
) in package bCMakeLists.txt
in package b correctly. See this.#include <package_b/msg_between_a_b.h>
and use it...Thanks. Yes I have missed a depend step.