ROS_PACKAGE_PATH问题。需要帮助设置.bashrc

时间:2017-02-03 18:02:08

标签: bash ros slam

我添加了

export ROS_PACKAGE_PATH="/home/kathir/ORB_SLAM":${ROS_PACKAGE_PATH}
.bashrc中的

我在cmake的{​​{1}}期间收到此错误。

ORB_SLAM

我在。ORB_SLAM cloned path : "/home/kathir/ORB_SLAM" 中的"/home/kathir/catkin_ws/devel/setup.bash"中有另一个工作区,因为我bashrc使用了ROS

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.

3 个答案:

答案 0 :(得分:2)

您可能看到的错误是因为导出的变量未在当前shell中生效。您需要在当前shell中source使其生效,

source ~/.bashrc

或更简单地只是

. ~/.bashrc

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

答案 1 :(得分:0)

source~ / .bashrc应该用于使包路径有效

答案 2 :(得分:0)

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

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

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