== Workspace Setup ==

If you have not yet created a workspace in which to complete the tutorials, <<SeeSaw("EnvironmentSetup", toshow="click here for some brief instructions")>>.

{{{{{{{#!wiki seesaw EnvironmentSetup

<<Version()>>

{{{{{#!wiki version fuerte_and_older

Create a file named ~/tutorials.rosinstall with the following content:
{{{
- other: { local-name: workspace }
}}}

To overlay on the `ROS` distro you are using:
{{{
rosinstall ~/tutorials /opt/ros/$ROS_DISTRO>> ~/tutorials.rosinstall
}}}

To use this workspace '''whenever''' you open a new terminal setup your ROS environment by typing:
{{{
source ~/tutorials/setup.bash
}}}

Sourcing this file adds `~/tutorials/workspace` to your ROS_PACKAGE_PATH.

Any packages you create in that directory will be found by [[rospack]].

An alternative to source your script file is to add it to your `.bashrc`, but remember that this will persist in your `.bashrc` into the future, and you can only have one environment setup.  For more on what this is doing see [[rosinstall#Generating_setup.sh| this page]]
}}}}}

{{{{{#!wiki version groovy_and_newer
Create a [[catkin]] workspace like so:

{{{
$ source /opt/ros/$ROS_DISTRO/setup.bash
$ mkdir -p ~/tutorial_ws/src
$ cd ~/tutorial_ws
$ catkin_init_workspace src
$ catkin_make
}}}

And now source the setup file from the result-space, so that packages you add to this workspace's `src` folder will be findable by [[rospack]], and the built binaries by [[rosrun]] and [[roslaunch]]:

{{{
$ source devel/setup.bash
}}}

}}}}}

}}}}}}}