2022-02-09 12:56:27 -0500 | received badge | ● Famous Question
(source)
|
2021-11-29 03:47:46 -0500 | received badge | ● Notable Question
(source)
|
2021-11-11 10:10:03 -0500 | received badge | ● Famous Question
(source)
|
2021-09-17 11:44:37 -0500 | marked best answer | Custom message header not found when running cmake (c++) When I include the message header as #include "tutorial2/person_data.h , and then run catkin_make it says that there is no such file or directory. I have followed this solution: https://www.theconstructsim.com/ros-q.... But it still shows the error.
I think the problem is in this line add_dependencies(publisher_node tutorial2_generate_messages_cpp) tutorial2 is the name of the package. publisher_node is the name of the file I'm trying to include the message in. Here is my CMakeLists.txt: cmake_minimum_required(VERSION 3.0.2)
project(tutorial2)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs message_generation)
include_directories(${catkin_INCLUDE_DIRS})
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()
################################################
## Declare ROS messages, services and actions ##
################################################
## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
## * add a build_depend tag for "message_generation"
## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
## but can be declared for certainty nonetheless:
## * add a exec_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
## * add "message_generation" and every package in MSG_DEP_SET to
## find_package(catkin REQUIRED COMPONENTS ...)
## * add "message_runtime" and every package in MSG_DEP_SET to
## catkin_package(CATKIN_DEPENDS ...)
## * uncomment the add_*_files sections below as needed
## and list every .msg/.srv/.action file to be processed
## * uncomment the generate_messages entry below
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
## Generate messages in the 'msg' folder
add_message_files(
FILES
person_data.msg
)
## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
#generate_messages(DEPENDENCIES std_msgs)
################################################
## Declare ROS dynamic reconfigure parameters ##
################################################
## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
## * add "dynamic_reconfigure" to
## find_package(catkin REQUIRED COMPONENTS ...)
## * uncomment the "generate_dynamic_reconfigure_options" section below
## and list every .cfg file to be processed
## Generate dynamic reconfigure parameters in the 'cfg' folder
# generate_dynamic_reconfigure_options(
# cfg/DynReconf1.cfg
# cfg/DynReconf2.cfg
# )
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project ... (more) |
2021-09-06 10:26:58 -0500 | received badge | ● Popular Question
(source)
|
2021-09-06 04:08:08 -0500 | commented question | Custom message header not found when running cmake (c++) It comes up with this error when running catkin_make
Could not find messages which
'/home/harry/tutorials/src/tutoria |
2021-09-03 11:18:32 -0500 | commented question | Custom message header not found when running cmake (c++) I have edited my question
|
2021-09-03 11:18:11 -0500 | edited question | Custom message header not found when running cmake (c++) Custom message header not found when running cmake (c++)
When I include the message header as #include "tutorial2/person |
2021-09-03 11:17:33 -0500 | received badge | ● Editor
(source)
|
2021-09-03 11:17:33 -0500 | edited question | Custom message header not found when running cmake (c++) Custom message header not found when running cmake (c++)
When I include the message header as #include "tutorial2/person |
2021-09-03 11:13:38 -0500 | edited question | Custom message header not found when running cmake (c++) Custom message header not found when running cmake (c++)
When I include the message header as #include "tutorial2/person |
2021-09-03 11:08:04 -0500 | commented question | Custom message header not found when running cmake (c++) Yes, I have included the message in my CMake file
|
2021-09-03 10:08:44 -0500 | asked a question | Custom message header not found when running cmake (c++) Custom message header not found when running cmake (c++)
When I include the message header as #include "tutorial2/person |
2021-09-02 01:32:26 -0500 | received badge | ● Notable Question
(source)
|
2021-09-01 10:30:02 -0500 | marked best answer | no such file or directory ros/ros.h In my file I have included #include "ros/ros.h" it says no such file or directory. I am using VS Code, ROS noetic on Ubuntu 20.04 LTS. Here is my package.xml: <?xml version="1.0"?>
<package format="2">
<name>beginner_tutorials</name>
<version>0.0.0</version>
<description>The beginner_tutorials package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="harry@todo.todo">harry</maintainer>
<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>
<!-- Url tags are optional, but multiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/beginner_tutorials</url> -->
<!-- Author tags are optional, multiple are allowed, one per tag -->
<!-- Authors do not have to be maintainers, but could be -->
<!-- Example: -->
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
<!-- The *depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
<!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
<!-- <depend>roscpp</depend> -->
<!-- Note that this is equivalent to the following: -->
<!-- <build_depend>roscpp</build_depend> -->
<!-- <exec_depend>roscpp</exec_depend> -->
<!-- Use build_depend for packages you need at compile time: -->
<!-- <build_depend>message_generation</build_depend> -->
<!-- Use build_export_depend for packages you need in order to build against this package: -->
<!-- <build_export_depend>message_generation</build_export_depend> -->
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
<!-- Use exec_depend for packages you need at runtime: -->
<!-- <exec_depend>message_runtime</exec_depend> -->
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<!-- Use doc_depend for packages you need only for building documentation: -->
<!-- <doc_depend>doxygen</doc_depend> -->
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>message_runtime</exec_depend>
<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->
</export>
</package>
Here is my CMakeLists.txt cmake_minimum_required(VERSION 3.0.2)
project(beginner_tutorials)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()
################################################
## Declare ROS messages, services ... (more) |
2021-09-01 10:30:02 -0500 | received badge | ● Scholar
(source)
|
2021-09-01 10:26:19 -0500 | commented question | no such file or directory ros/ros.h Thanks! I have solved the issue
|
2021-09-01 09:02:42 -0500 | commented question | no such file or directory ros/ros.h I appreciate the help, but it is still giving me the error
|
2021-09-01 07:34:36 -0500 | received badge | ● Popular Question
(source)
|
2021-09-01 07:06:48 -0500 | commented question | no such file or directory ros/ros.h No, I think it’s the CMakeLists.txt file
|
2021-09-01 06:49:57 -0500 | commented answer | no such file or directory ros/ros.h I am still getting no such file or directory
|
2021-09-01 06:47:37 -0500 | commented question | no such file or directory ros/ros.h I am still getting no such file or directory
|
2021-09-01 03:56:28 -0500 | commented question | no such file or directory ros/ros.h I’m having trouble finding ros/ros.h
|
2021-08-31 12:06:54 -0500 | asked a question | no such file or directory ros/ros.h no such file or directory ros/ros.h
In my file I have included #include "ros/ros.h" it says no such file or directory. I |