1. 程式人生 > >[ros]編譯ORBSLAM2時候,ros路徑問題

[ros]編譯ORBSLAM2時候,ros路徑問題

amp 目錄 bsp example comm gedit bashrc setup.s and

CMake Error at CMakeLists.txt:2 (include):
include could not find load file:

/core/rosbuild/rosbuild.cmake


CMake Error at CMakeLists.txt:4 (rosbuild_init):
Unknown CMake command "rosbuild_init".

其實是因為ros的當前工作目錄沒設置對。

之前一直用

$ sudo gedit ~/.bashrc

把路徑加進去,後來source ~/.bashrc之後,還是找不對目錄。

然後

在/opt/ros/indigo/setup.sh最後加

export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/ORB_SLAM2/Examples/ROS

source 下成功了。 很神奇為啥在~/.bashrc下就不行

[ros]編譯ORBSLAM2時候,ros路徑問題