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

what's the meaning of the command: source /opt/ros/groovy/setup.bash

asked 2014-01-29 07:36:56 -0600

saina110 gravatar image

updated 2014-04-20 14:09:31 -0600

ngrennan gravatar image

Hello professors, I am so confused about the tutorial of catkin which told us that we should type the command: source /opt/ros/groovy/setup.bash every time.... I have no idea. because before I type this command, my workspace is under home directory which is /home/username/workspace, but when I type this command and then I type the 'roscd', the path turned to /opt/ros/groovy/.. so my question is where should I create my package? Does that mean every time when I want to create package I should source first? I' so confused about this.. cause when I try to create package and run it, there always be showing some error which told me that command not found....I just follow the tutorials....

Thanks so much for your instruction.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-01-29 09:16:47 -0600

fergs gravatar image

These setup.bash files setup your environment variables and paths. When first setting up your workspace, you need to have sourced /opt/ros/distro/setup.bash. After you have a workspace and have run catkin_make, there will be a new setup file found in <workspace>/devel/setup.bash or, if you ran catkin_make with install, <workspace>/install/setup.bash. To have your workspace be part of your paths/environment, you need to use these new setup.bash files (which will effectively already include all the paths and environment variables found in the one in /opt/ros since they were part of the environment when you created the workspace)</workspace></workspace>

edit flag offensive delete link more
1

answered 2014-01-29 09:39:55 -0600

uzair gravatar image

Well if you dont want to do it everytime then u can just type echo "source /opt/ros/groovy/setup.bash">>~/.bashrc at your terminal. Then ur setup.bash runs everytime u open a new terminal on its own and you dont have to source it everyitme u open a new terminal.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-01-29 07:36:56 -0600

Seen: 3,852 times

Last updated: Jan 29 '14