1. First, source your ROS environment

    source /opt/ros/melodic/setup.bash

  2. Create catkin directories

    mkdir -p ~/catkin_ws/src

  3. Initialize catkin workspace

     cd ~/catkin_ws
     catkin_make
    

New environment can be sourced by running

source ~/catkin_ws/devel/setup.bash


To be able to make a pull request to an open source project, one might need to update the forked repository. This can be done using git rebase using the following steps:

  1. Add the remote original repo as upstream to your local repo

    git remote add upstream <original repo>

  2. Fetch all the branches from the remote upstream

    git fetch upstream

  3. Rebase local master with upstream’s master

    git rebase upstream/master

  4. Update your forked repository master by pushing the rebased branch

    git push origin master


An environment variable for a specific ROS package can be set in the package’s launch file. Simply add the <env> tag within the <launch> tags.

#file: package_1_launch_file.luanch
<launch>
    <env name="KEY" value="10" />
    <node pkg="package_1" type="main.py" name="ros_package_1" args="-v">
	</node>
</launch>