2017-02-03 98 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中被其他的答案說。

或重新打開終止,接下來的每次你打開終端,該腳本將自動運行