Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 84

catkin_make not detecting .msg files in msg directory

$
0
0
I'm fairly new to ROS, so I don't fully comprehend what's going on. This wasn't an issue until I installed some new python libraries to my computer earlier today. Essentially, when I run catkin_make it doesn't make the msg files available as header files in the include directory in the devel directory. So when it tries to compile the .cpp files in the source directory it says "mobility/Resource.h" no such file or directory. Now, when I move the .msg files up one directory to the same directory as mobility/ where CMakeLists.txt and package.xml are, then it does detect them. This is the current directory structure with the .msg files where they are supposed to be. This wasn't an issue at all until today. It compiled perfectly before today. Oh yes. So if I do rosmsg list | grep mobility all 3 msg files show up. Doesn't compile with this: mobility/ ├── CMakeLists.txt ├── msg │   ├── Pose2D.msg │   ├── Resource.msg │   └── Status.msg ├── package.xml └── src └── mobility.cpp Compiles with this: src/mobility/ ├── CMakeLists.txt ├── msg │   ├── Pose2D.msg │   ├── Resource.msg │   └── Status.msg ├── package.xml ├── Pose2D.msg ├── Resource.msg ├── src │   └── mobility.cpp └── Status.msg Current CMake file: cmake_minimum_required(VERSION 2.8.3) project(mobility) find_package(catkin REQUIRED COMPONENTS geometry_msgs roscpp sensor_msgs std_msgs random_numbers message_generation ) add_message_files( FILES Resource.msg Pose2D.msg Status.msg ) generate_messages( DEPENDENCIES std_msgs ) catkin_package( CATKIN_DEPENDS geometry_msgs roscpp sensor_msgs std_msgs random_numbers message_runtime ) add_executable( mobility src/mobility.cpp ) target_link_libraries( mobility ${catkin_LIBRARIES} ) package.xml: mobility0.2.0Algorithmic implementation of random search as a finite state machineNASA SwarmathonGPLv2catkingeometry_msgsroscppsensor_msgsstd_msgsrandom_numbersmessage_generationgeometry_msgsroscppsensor_msgsstd_msgsrandom_numbersmessage_runtime first few lines of mobility.cpp: #include //ROS libraries #include #include #include //ROS messages #include #include #include #include #include #include #include #include #include "mobility/Resource.h" #include "mobility/Pose2D.h" #include "mobility/Status.h" #include // To handle shutdown signals so the node quits properly in response to "rosnode kill" #include #include

Viewing all articles
Browse latest Browse all 84

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>