Could not find messages
when I did catkin_make,I got the bellow error. I made msg file. But it said that there is no message. How can I solve the peoblem?
CMake Error at /opt/ros/kinetic/share/catkin/cmake/assert.cmake:20 (message):
Assertion failed: file
'/home/robot/catkin_ws/src/ndt3d/msg/  humansArray.msg' does not exist.
Message: message file not found
Call Stack (most recent call first):
/opt/ros/kinetic/share/genmsg/cmake/genmsg-extras.cmake:113 (assert_file_exists)
ndt3d/CMakeLists.txt:60 (add_message_files)
I wrote like bellow in CMakeList.txt
add_message_files(
#DIRECTORY
# msg
FILES
NDTResult.msg
StampedArray.msg
humansArray.msg
)
error:
CMake Error at /home/robot/catkin_ws/build/ndt3d/cmake/ndt3d-genmsg.cmake:3 (message):
Could not find messages which
'/home/robot/catkin_ws/src/ndt3d/msg/humansArray.msg' depends on. Did you
forget to specify generate_messages(DEPENDENCIES ...)?
Cannot locate message [Pose] in package [ndt3d] with paths
[['/home/robot/catkin_ws/src/ndt3d/msg']]
Call Stack (most recent call first):
/opt/ros/kinetic/share/genmsg/cmake/genmsg-extras.cmake:307 (include)
ndt3d/CMakeLists.txt:90 (generate_messages)
-- Configuring incomplete, errors occurred!
See also "/home/robot/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/robot/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:7248: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
Asked by k's on 2019-11-06 08:29:25 UTC
Comments
Did you forget to specify generate_messages(DEPENDENCIES ...)?
If your custom message depends on other ROS messages (like
geometry_msgs/Pose.msg
), you need to add them in yourCMakeLists.txt
as follows:Asked by Jasmin on 2019-11-06 17:02:51 UTC
It would be helpful if you post your
humansArray.msg
file.Asked by Jasmin on 2019-11-06 17:06:30 UTC
Looks like you have just
Pose
instead ofgeometry_msgs/Pose
in yourhumansArray.msg
file. Please post it!Asked by KenYN on 2019-11-06 19:18:29 UTC
Inside humansArray.msg:
Header header Pose[] poses
float64[] id
I mistook inside msg file. I changed "Pose[]" to "float64[]". Then I could do catkin_make.
Thank you
Asked by k's on 2019-11-07 02:08:23 UTC
Can I use Pose[] in my own msg?
Asked by k's on 2019-11-07 03:58:08 UTC
Do you mean
geometry_msgs/Pose
?Asked by Jasmin on 2019-11-07 04:01:14 UTC