diff --git a/ros_packages/mrs_uav_gazebo_simulation/launch/mrs_drone_spawner.launch b/ros_packages/mrs_uav_gazebo_simulation/launch/mrs_drone_spawner.launch index ed91357..7036504 100644 --- a/ros_packages/mrs_uav_gazebo_simulation/launch/mrs_drone_spawner.launch +++ b/ros_packages/mrs_uav_gazebo_simulation/launch/mrs_drone_spawner.launch @@ -1,6 +1,6 @@ - + diff --git a/ros_packages/mrs_uav_gazebo_simulation/scripts/mrs_drone_spawner b/ros_packages/mrs_uav_gazebo_simulation/scripts/mrs_drone_spawner deleted file mode 100755 index 849fb57..0000000 --- a/ros_packages/mrs_uav_gazebo_simulation/scripts/mrs_drone_spawner +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# author: Vojtech Spurny - -set -e - -trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG -trap 'echo "$0: \"${last_command}\" command failed with exit code $?"' ERR - -distro=`lsb_release -r | awk '{ print $2 }'` -[ "$distro" = "18.04" ] && ROS_DISTRO="melodic" -[ "$distro" = "20.04" ] && ROS_DISTRO="noetic" - -debian=`lsb_release -d | grep -i debian | wc -l` -[[ "$debian" -eq "1" ]] && ROS_DISTRO="noetic" && distro="20.04" && DEBIAN=true - -script_path="$(rospack find mrs_uav_gazebo_simulation)/scripts/mrs_drone_spawner.py" - -# select Ubuntu version -if [ "$distro" = "18.04" ]; then - - python_exec=python - -elif [ "$distro" = "20.04" ]; then - - python_exec=python3 - -else - echo -e "\e[31mThis version of OS is untested. Modify this script accordingly.\e[0m" - exit 1 - -fi - -#execute script -$python_exec $script_path $@ diff --git a/ros_packages/mrs_uav_gazebo_simulation/scripts/mrs_drone_spawner.py b/ros_packages/mrs_uav_gazebo_simulation/scripts/mrs_drone_spawner.py old mode 100644 new mode 100755 index 3b20787..180efaf --- a/ros_packages/mrs_uav_gazebo_simulation/scripts/mrs_drone_spawner.py +++ b/ros_packages/mrs_uav_gazebo_simulation/scripts/mrs_drone_spawner.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 + import copy import csv import os @@ -666,6 +668,8 @@ def exit_handler(): if __name__ == '__main__': + print('[INFO] [MrsDroneSpawner]: Starting') + show_help = True if 'no_help' in sys.argv: show_help = False @@ -676,7 +680,5 @@ def exit_handler(): try: spawner = MrsDroneSpawner(show_help, verbose) - except rospy.ROSInterruptException: pass -