ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

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

asked 2013-05-28 02:42:57 -0600

Albert K gravatar image

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 flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-05-28 02:50:42 -0600

allenh1 gravatar image

updated 2013-05-29 03:00:01 -0600

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
edit flag offensive delete link more


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.

Albert K gravatar image Albert K  ( 2013-05-28 15:34:48 -0600 )edit

Like Allen mentioned, there is likely a line in $HOME/code/ros_groovy/devel/setup.bash that sources from /opt/ros/groovy See and to understand the environment created with workspace

weiin gravatar image weiin  ( 2013-05-28 16:12:11 -0600 )edit

answered 2013-05-29 04:09:27 -0600

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.

edit flag offensive delete link more

Question Tools


Asked: 2013-05-28 02:42:57 -0600

Seen: 931 times

Last updated: May 29 '13