Back to ROS Main Page

Go to the path were you want to create the workspace

cd /path/to/workspace

Create the workspace, named ws, and the source folder called src

mkdir -p ws/src
cd ws
catkin_make

Additional folders have been created :

ls
build  devel  src

The content of the workspace has to be made available to ROS so that our new packages can be used in ROS. Normally, there is no path to our new workspace :

echo $ROS_PACKAGE_PATH
/opt/ros/melodic/share

After initialization, the path is updated and our packages will now be usable in ROS :

source devel/setup.bash
echo $ROS_PACKAGE_PATH
/path/to/workspace/ws/src:/opt/ros/melodic/share

Back to top.