1. 程式人生 > >ROS Base path和Source space不一致問題,修改檔名後無法make問題,catkin_make報錯問題

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檔案以及環境配置是否有問題

相關推薦

no