0
$\begingroup$

Rosanswers logo

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.


Originally posted by saina110 on ROS Answers with karma: 107 on 2014-01-29

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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 /devel/setup.bash or, if you ran catkin_make with install, /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)


Originally posted by fergs with karma: 13902 on 2014-01-29

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by uzair with karma: 87 on 2014-01-29

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.