我正在关注有关如何创建ROS自定义消息的“ WS Newman's”教程。编译“消息/服务'example_msg / Num'的依赖性已更改。请重新运行cmake”
时,发生以下错误Num.msg有
std::advance
Cmakelists.txt
Header header
int32 demo_int
float64 demo_double
package.xml
project(example_msg)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
message_generation
)
add_message_files(
FILES
Num.msg
# Message2.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
CATKIN_DEPENDS message_runtime
)
include_directories(
include ${catkin_INCLUDE_DIRS}
# include
${catkin_INCLUDE_DIRS}
)
add_executable(example_ros_message_publisher
src/example_ros_message_publisher.cpp
)
add_dependencies(example_ros_message_publisher ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(example_ros_message_publisher
${catkin_LIBRARIES}
)
example_ros_message_publisher.cpp
<package format="2">
<name>example_msg</name>
<version>0.0.0</version>
<description>The example_msg package</description>
<maintainer email="asiri@todo.todo">asiri</maintainer>
<license>TODO</license>
<build_depend>message_generation</build_depend>
<exec_depend>message_runtime</exec_depend>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>std_msgs</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>std_msgs</exec_depend>
<export>
</export>
</package>
当我运行catkin_make install时,出现以下错误。 “消息/服务'example_msg / Num'的依赖关系已更改。请重新运行cmake。”
答案 0 :(得分:1)
柳絮中的错误。
要触发更深层次的重建,可以触摸包含CMakeLists.txt
的软件包的example_msg/Num
文件。