在一次ros工程功能包的编译过程中,像往常一样,在catkin_ws目录下使用了catkin_make命令,却突然遇到了自己新添加的功能包无法正常编译的bug。
初步怀疑可能是因为在系统里装了anaconda,gym-gazebo,opencv以及一些深度学习环境,导致某些包之间发生了冲突???但是排查了好久,检查了好多遍环境变量的设置,依旧未果(希望有懂的大佬不吝赐教呀)。
现在暂时找到了可以避免这个问题的方法,记录之:
- 在此之前,使用catkin_make编译ros工程一切正常。当在工程中加入新的功能包后,再次使用catkin_make命令(先删除根目录下的/devel,/build文件夹,再使用catkin_make),显示以下界面,没有任何报错提示,就是没有编译功能包,心态有点炸啊啊啊:
xy@xy:~/catkin_ws$ catkin_make
Base path: /home/xy/catkin_ws
Source space: /home/xy/catkin_ws/src
Build space: /home/xy/catkin_ws/build
Devel space: /home/xy/catkin_ws/devel
Install space: /home/xy/catkin_ws/install
####
#### Running command: "cmake /home/xy/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/xy/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/xy/catkin_ws/install -G Unix Makefiles" in "/home/xy/catkin_ws/build"
####
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting

本文记录了一次ROS工程编译中遇到的问题及解决方案,包括使用catkin_build代替catkin_make,解决编译错误,以及通过修改文件权限解决roslaunch启动节点失败的问题。

2761

被折叠的 条评论
为什么被折叠?



