[ros-users] ni setup.bash issue

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: User discussions
日付:  
To: ros-users
題目: [ros-users] ni setup.bash issue
Hi all,

I just realised about a potential pitfall in how the setup.sh file in
the ni stack works. Sorry if this has already been brought to
attention, but I couldn't find any reference.

I've seen that the setup.sh file inside the ni stack writes the
ROS_PACKAGE_PATH with the path of ni and the path where ros is
installed (e.g. /opt/ros/diamondback). The thing is that if I have
added some extra folders to the ROS_PACKAGE_PATH in my .bashrc before
sourcing the setup.sh in ni stack, it will erase those extra folders.

For example, if my .bashrc has:

source /opt/ros/diamondback/setup.bash
export ROS_PACKAGE_PATH=/my/additional/ros/stacks:$ROS_PACKAGE_PATH
source ~/ni/setup.bash

Then /my/additional/ros/stacks will not be part of the environment
variable, and thus my packages won't be found by ROS.

Wouldn't it be better if the setup.sh in the ni stack would prepend
the ni stack folder to $ROS_PACKAGE_PATH instead of
/opt/ros/diamondback? Or am I doing something wrong?

Regards,
Miguel.