2017-02-03 64 views
0

帮助我在.bashrc添加ROS_PACKAGE_PATH问题。需要设置的.bashrc

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

和期间的ORB_SLAMcmake我得到这个错误。

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

我在"/home/kathir/catkin_ws/devel/setup.bash"中有另一个工作区。 bashrc因为我使用ROSARDRONE

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. 

下面检查进一步信息

[email protected]:~/ORB_SLAM/build$ source .bashrc 
bash: .bashrc: No such file or directory 
[email protected]:~/ORB_SLAM/build$ $ROS_PACKAGE_PATH 
bash: /opt/ros/indigo/share:/opt/ros/indigo/stacks:M$:: No such file or directory 
+0

你将用'export'线后做'源.bashrc'? – Inian

+0

'/ home/kathir/ORB_SLAM'已经在你的'ROS_PACKAGE_PATH'中了吗?把'echo“$ ROS_PACKAGE_PATH”'放在'export'之前,看看你得到了什么。 – cxw

+0

@Inian:请检查最新的编辑。 –

回答

2

错误你很可能看到的是因为你的出口变量在当前shell中不起作用。你需要它source它在当前的外壳让它生效,

source ~/.bashrc 

以上只是简单地

. ~/.bashrc 

其中进口所有的新的环境变量到现有会话。您在后续会话中没有这样做,因为这将用于启动时打开的每个新会话。

0

源的〜/ .bashrc应该用来进行有效的包路径

0

,如果你有添加路径,并将其写入到.bashrc中,您可以:

运行脚本:源〜/ .bashrc中被其他的答案说。

或重新打开终止,接下来的每次你打开终端,该脚本将自动运行