Installing and Configuring the default ROS Environment

This is not necessary if you will be creating your own custom workspace

from here

# this is only necessary if you have not added ROS to bashrc from the last section
#source /opt/ros/melodic/setup.bash

#Let's create and build a catkin workspace:

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
#for Python 3 users, the first catkin_make command in a clean catkin workspace must be:
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
# for python2.x

#source your new setup.*sh file.  You need to do this every time unless you add it to .bashrc
source devel/setup.bash

#make sure ROS_PACKAGE_PATH environment variable includes the directory you're in.