Could not find messages which depends on
Hello all,
I've been trying to define a custom message on my own but when i run catkin build command, I keep getting the same error:
Errors << tryout_nodes:check /home/yigithan/catkin_ws/logs/tryout_nodes/build.check.019.log CMake Error at /home/yigithan/catkin_ws/build/tryout_nodes/cmake/tryout_nodes-genmsg.cmake:3 (message): Could not find messages which '/home/yigithan/catkin_ws/src/tryout_nodes/msg/SensorInformation.msg' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?
Cannot locate message [Range]: unknown package [sensor_msgs] on search path [{{'std_msgs': ['/opt/ros/melodic/share/std_msgs/cmake/../msg'], 'tryout_nodes': ['/home/yigithan/catkin_ws/src/tryout_nodes/msg']}}] Call Stack (most recent call first): /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:307 (include) CMakeLists.txt:11 (generate_messages)
The thing is, when I run rosmsg show SensorInformation , the terminal gives me the content of my message file. I am leaving my CMakeLists.txt below. I would appreciate any help. Thanks!
cmake_minimum_required(VERSION 3.0.2) project(tryout_nodes)
find_package(catkin REQUIRED COMPONENTS rospy std_msgs message_generation)
add_message_files(DIRECTORY msg FILES SensorInformation.msg )
generate_messages( DEPENDENCIES std_msgs )
catkin_package( CATKIN_DEPENDS message_runtime std_msgs rospy )