ROS Base path和Source space不一致问题,修改文件名后无法make问题,catkin_make报错问题
在一次在ROS 的学习实践中,将Ros工程目录名称更改了,source后,出现了base path和Source space不一致问题:
报错提示:
Base path: /home/pot/catkin_ws_top
Source space: /home/pot/catkin_ws_top/src
The specified base path "/home/pot/catkin_ws_top" contains a CMakeLists.txt but "catkin_make" must be invoked in the root of workspace
图示:
修改方法:
将工作目录下的CMakeLists.txt删除,重新catkin_make一下,会提示:
CMake Error: The current CMakeCache.txt directory /home/pot/catkin_ws/build/CMakeCache.txt is different than the directory /home/pot/catkin_ws_top/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
提示当前的编译路径和已经存在的CMakeCache.txt不匹配问题
图示:
解决办法,删除工作目录下build的全部文件重新catkin_make
编译通过
图示
如还有其它问题请自行检查CMakeListis.txt文件以及环境配置是否有问题