To make Gazebo die sooner, edit the file at /opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py
:
Near line 57, change the timeouts to be:
_TIMEOUT_SIGINT = 0.5 #seconds
_TIMEOUT_SIGTERM = 0.5 #seconds
This will cause ROS to send a kill
signal much sooner.
Thanks, Worked well, Used-
sudo gedit /opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py
Now it is taking less time to shut down.