title: ROS launchfile does not work in bash file
body: <pre><code>#!/bin/bash
  source /home/user/AFROS/catkin_ws/devel/setup.bash
  source /opt/ros/melodic/setup.bash
  roslaunch /opt/ros/melodic/launchfile.launch
  </code></pre>
  
  <p>I have this as my bash file that I would like to use to execute a launch file. I am able to launch the launchfile using </p>
  
  <pre><code> roslaunch launchfile.launch 
  </code></pre>
  
  <p>just fine, but if I use my bash file then I get the following error:</p>
  
  <pre><code>ERROR: cannot launch node of type [ros_core/connection_commander_node]: ros_core
  ROS path [0]=/opt/ros/melodic/share/ros
  ROS path [1]=/opt/ros/melodic/share
  ERROR: cannot launch node of type [ros_core/state_machine_commander_node]: ros_core
  ROS path [0]=/opt/ros/melodic/share/ros
  ROS path [1]=/opt/ros/melodic/share
  </code></pre>