ubuntu常见的编译时的问题

最近在b站系统的学习ros相关的知识(之前自学的非常零散而且不系统),先推荐一波Autolabor官方账号推出的ROS机器人入门课程,老师讲的非常细致,很适合小白听064服务通信_自定义srv_Chapter2-ROS通信机制_哔哩哔哩_bilibili

 自己在复刻老师的操作时碰到了很多问题,大多都是在编译的时候出的错,写这篇也是为了自己归纳总结,希望对碰到类似问题的朋友有一定的帮助

1、

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_install_python.cmake:68 (message):

catkin_install_python() called with non-existing file

'/home/sun/aubo_ws/src/AUBO_robot/aubo_planner/script/aubo_planner/aubo_ros_plan'.

Call Stack (most recent call first):

AUBO_robot/aubo_planner/CMakeLists.txt:77 (catkin_install_python)

-- Configuring incomplete, errors occurred!

See also "/home/sun/aubo_ws/build/CMakeFiles/CMakeOutput.log".

See also "/home/sun/aubo_ws/build/CMakeFiles/CMakeError.log".

Makefile:318: recipe for target 'cmake_check_build_system' failed

make: *** [cmake_check_build_system] Error 1

Invoking "make cmake_check_build_system" failed
 

红字标出的就是最明显的特征:catkin_install_python配置了不存在的文件,这种时候基本上都是AUBO_robot/aubo_planner/CMakeList.txt:77中 catkin_install_python后面的文件名字写错了,一定注意拼写和空格问题

一般都在175行左右啊

2、

CMake Error at /home/chenqi/chenqi_ws/src/plumbing_server_client/cmake/addint.srv.cmake:3 (message):
  Could not find messages which

'/home/chenqi/chenqi_ws/src/plumbing_server_client/srv/addint.srv'
  depends on.  Did you forget to specify generate_messages(DEPENDENCIES ...)?

  Cannot locate message [String] in package [l] with
  paths [['/home/chenqi/chenqi_ws/src/plumbing_server_client/srv']]
Call Stack (most recent call first):
  /opt/ros/kinetic/share/genmsg/cmake/genmsg-extras.cmake:307 (include)
  learning_communication/CMakeLists.txt:71 (generate_messages)


-- Configuring incomplete, errors occurred!
See also "/home/sophie/ghl/catkin_ghl/build/CMakeFiles/CMakeOutput.log".
See also "/home/sophie/ghl/catkin_ghl/build/CMakeFiles/CMakeError.log".
Makefile:556: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
 

如上图,我的服务消息定义的很简单,之使用了标准消息库,但是int32漏个数字写成了

int3,这种错误一定要检查依赖关系,简单的一般是roscpp,rospy,std_msgs,

        1)要么是cmakelist中的依赖拼错了,

        2)要么就和我类似,在声明变量的时候写错了,导致它认为使用了cmake中添加的依赖关系       之外的其他依赖,所以报错缺少依赖关系。请大家一定仔细检查拼写问题

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值