# What is /opt/ros/groovy/setup.sh for in the ~/.bashrc

I'm now transferring from Fuerte to Groovy. I found that after setting up the workspace, I don't need the line "source /opt/ros/groovy/setup.bash" in ~/.bashrc . It seems that only "source $HOME/code/ros_groovy/devel/setup.bash" is needed in ~/.bashrc. I can still create and make package, and run a node successfully without "source /opt/ros/groovy/setup.bash". What will happen if I omit this line in the .bashrc? edit retag close merge delete ## 2 Answers Sort by » oldest newest most voted I imagine you have source /opt/ros/groovy/setup.bash somewhere in your other bash file. If you do, then you should not have to source the file in the .bashrc. If you don't, however, try omitting it/commenting it out (use a '#' in front of the line). If it doesn't work, then replace it. I don't know what would happen if you sourced it twice. I'm pretty sure it would not break anything. If I were you, I'd try it. If it doesn't work, reverse it. Make a copy of your current settings: cp ~/.bashrc ~/.bashrc.old  Then modify it. If it breaks stuff, then just do: cp ~/.bashrc.old ~/.bashrc  more ## Comments Do you have the similar experience? What will happen if you omit this line on your computer? For my case, I can do the usual works correctly, but I wonder if there might be some problems. ( 2013-05-28 15:34:48 -0500 )edit Like Allen mentioned, there is likely a line in$HOME/code/ros_groovy/devel/setup.bash that sources from /opt/ros/groovy See http://www.ros.org/wiki/ROS/Tutorials/InstallingandConfiguringROSEnvironment and http://www.ros.org/wiki/catkin/workspaces to understand the environment created with workspace

( 2013-05-28 16:12:11 -0500 )edit

What I understood about sourcing /opt/ros/groovy/setup.bash or .bash file in your workspace is that the second one is used if you work with workspaces and this add your packages path (ws/src) to your env variables. Also if you want to switch workspaces, you have to source the corresponding .bash file of it.

If you dont want to use workspaces, you just want to create packages, you have to source /opt/ros/groovy/setup.bash and add your package path to \$ROS_PACKAGE_PATH variable.

more