[Documentation] [TitleIndex] [WordIndex

Workspace Setup

If you have not yet created a workspace in which to complete the tutorials, click here for some brief instructions .

  Show EOL distros: 

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/<<VersionName()>> ~/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 this page

Create a catkin workspace like so:

$ source /opt/ros/<<VersionName()>>/setup.bash
$ mkdir ~/tutorial_ws
$ 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

2024-07-20 13:25