整理草稿箱的时候看到自己一年多前做的记录, 有点幼稚的问题, 还是发出来吧~
1. 在ORB中编译ROS
CMake Error at /opt/ros/kinetic/share/ros/core/rosbuild/private.cmake:102 (message):
[rosbuild] rospack found package "ORB_SLAM2" at "", but the current
directory is "/home/Project/orb_slam_ROS/Examples/ROS/ORB_SLAM2".
You should double-check your ROS_PACKAGE_PATH to ensure that packages are
found in the correct precedence order.
Call Stack (most recent call first):
/opt/ros/kinetic/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location)
CMakeLists.txt:4 (rosbuild_init)
其实,ROS算是比较新手友好的平台了, 很多的问题都会直接在报错时指出错误的地方; 比如说这里就是会直接指出需要检查ROS_PACKAGE_PATH来解决问题;
解决方法:
1. source /opt/ros/kinetic/setup.bash
2. gedit ~/.bashrc
3. 在末尾添加:export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/my_path_to_SLAM_ROS/