Hi Miguel,<br><br>We have specifically chosen to have setup.(ba)sh files use the current environment.  This ended up being a constant source of confusion due to the fact that if you were using one environment and then "changed" to another you might still  have remnants of the old one on your path.  And then if you created a new terminal it would not have the remnants and would behave differently.  <br>

<br>It is recommended that you setup rosinstall to contain your whole desired tree and then it will generate your setup.(ba)sh You can use the "other" tag to add arbitrary paths to your rosinstall file.  <a href="http://www.ros.org/wiki/rosinstall">http://www.ros.org/wiki/rosinstall</a><br>

<br>Tully<br><br><div class="gmail_quote">On Wed, Feb 23, 2011 at 1:23 AM, Miguel Prada Sarasola <span dir="ltr"><<a href="mailto:miguel.prada.sarasola@gmail.com">miguel.prada.sarasola@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I just found another issue with how this setup file works.<br>
<br>
I upgraded from cturtle to diamondback, and as I source the setup.sh in the ni stack _after_ sourcing the setup.sh in diamondback, the setup file in the ni stack overwrites the package path, removing the diamondback directory and including the cturtle one. I now this can be easily fixed (by rerunning rosinstall if I'm not mistaken, or even manually fixing the setup file), but it wouldn't be necessary if the setup file did append the ni stack dir to $ROS_PACKAGE_PATH instead of a hardcoded value that's created by rosinstall.<br>


<br>
Regards,<br>
Miguel.<br>
<br>
El 22/02/2011, a las 12:46, Miguel Prada escribió:<br>
<div><div></div><div class="h5"><br>
> Hi all,<br>
><br>
> I just realised about a potential pitfall in how the setup.sh file in<br>
> the ni stack works. Sorry if this has already been brought to<br>
> attention, but I couldn't find any reference.<br>
><br>
> I've seen that the setup.sh file inside the ni stack writes the<br>
> ROS_PACKAGE_PATH with the path of ni and the path where ros is<br>
> installed (e.g. /opt/ros/diamondback). The thing is that if I have<br>
> added some extra folders to the ROS_PACKAGE_PATH in my .bashrc before<br>
> sourcing the setup.sh in ni stack, it will erase those extra folders.<br>
><br>
> For example, if my .bashrc has:<br>
><br>
> source /opt/ros/diamondback/setup.bash<br>
> export ROS_PACKAGE_PATH=/my/additional/ros/stacks:$ROS_PACKAGE_PATH<br>
> source ~/ni/setup.bash<br>
><br>
> Then /my/additional/ros/stacks will not be part of the environment<br>
> variable, and thus my packages won't be found by ROS.<br>
><br>
> Wouldn't it be better if the setup.sh in the ni stack would prepend<br>
> the ni stack folder to $ROS_PACKAGE_PATH instead of<br>
> /opt/ros/diamondback? Or am I doing something wrong?<br>
><br>
> Regards,<br>
> Miguel.<br>
<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Tully Foote<br>Systems Engineer<br>Willow Garage, Inc.<br><a href="mailto:tfoote@willowgarage.com">tfoote@willowgarage.com</a><br>(650) 475-2827<br>