ROS学习过程中的错误记录1 - 创建ROS消息和ROS服务
发布日期:2021-07-01 04:03:51 浏览次数:3 分类:技术文章

本文共 1176 字,大约阅读时间需要 3 分钟。

创建ROS消息和ROS服务

1.创建完msg,编译过程中出现如下错误:

CMake Error at beginner_tutorials/CMakeLists.txt:51 (add_message_files):

Unknown CMake command “add_message_files”.
– Configuring incomplete, errors occurred!
See also “/home/jack/my_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/jack/my_ws/build/CMakeFiles/CMakeError.log”.
Makefile:696: recipe for target ‘cmake_check_build_system’ failed
make: *** [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed

在这里插入图片描述

解 决 过 程 : 解决过程: :

  • 经检查,在 CMakeLists.txt文件中的find_packag函数中忘了增加对message_generation的依赖,修改完后编译成功.
    在这里插入图片描述
    在这里插入图片描述

2.创建完srv,编译出现以下错误

– ==> add_subdirectory(beginner_tutorials)

CMake Error: Error in cmake code at
/home/jack/my_ws/src/beginner_tutorials/CMakeLists.txt:199:
Parse error. Function missing ending “)”. End of file reached.
– Configuring incomplete, errors occurred!
See also “/home/jack/my_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/jack/my_ws/build/CMakeFiles/CMakeError.log”.
Makefile:696: recipe for target ‘cmake_check_build_system’ failed
make: *** [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed

解 决 过 程 : 解决过程: :

  • 仔细观察,原来是函数少了个括号,修改后,编译成功
    在这里插入图片描述
    在这里插入图片描述

总结

  • 细心很重要 !

转载地址:https://miracle.blog.csdn.net/article/details/89788630 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Linux常用命令 - N年前的学习笔记
下一篇:关于Adams安装过程中问题的解决记录

发表评论

最新留言

初次前来,多多关照!
[***.217.46.12]2024年05月01日 09时03分17秒