0

我已经添加了

export ROS_PACKAGE_PATH="/home/kathir/ORB_SLAM":${ROS_PACKAGE_PATH}

in.bashrc并且我在cmakeof期间收到此错误ORB_SLAM

ORB_SLAM cloned path : "/home/kathir/ORB_SLAM"

"/home/kathir/catkin_ws/devel/setup.bash"在 . bashrc因为我正在使用ROSfor ARDRONE

CMake Error at /opt/ros/indigo/share/ros/core/rosbuild/private.cmake:102 (message):
  [rosbuild] rospack found package "ORB_SLAM" at "", but the current
  directory is "/home/kathir/ORB_SLAM".  You should double-check your
  ROS_PACKAGE_PATH to ensure that packages are found in the correct
  precedence order.

检查下面的更多信息

kathir@kathir-VirtualBox:~/ORB_SLAM/build$ source .bashrc
bash: .bashrc: No such file or directory
kathir@kathir-VirtualBox:~/ORB_SLAM/build$ $ROS_PACKAGE_PATH
bash: /opt/ros/indigo/share:/opt/ros/indigo/stacks:M$:: No such file or directory
4

3 回答 3

2

您可能看到的错误是因为您导出的变量在您当前的 shell 中没有生效。你需要它source在当前的shell中才能生效,

source ~/.bashrc

或者更简单地说

. ~/.bashrc

它将所有新的环境变量导入现有会话。您不必为后续会话执行此操作,因为这将来自启动时打开的每个新会话。

于 2017-02-05T10:47:21.890 回答
0

source ~/.bashrc 应该用来使包路径生效

于 2017-02-05T00:08:24.297 回答
0

如果您已添加路径并将其写入 .bashrc,您可以:

运行脚本: source ~/.bashrc 如另一个答案所述;

或重新打开终止,下次每次打开终端时,脚本将自动运行

于 2017-02-17T08:26:47.407 回答