diff --git a/gazebo_ros/scripts/debug b/gazebo_ros/scripts/debug index e1326766c..375735f05 100755 --- a/gazebo_ros/scripts/debug +++ b/gazebo_ros/scripts/debug @@ -19,4 +19,4 @@ then fi setup_path=$(pkg-config --variable=prefix gazebo)/share/gazebo/ -. $setup_path/setup.sh && rosrun gazebo_ros gdbrun gzserver $final +. $setup_path/setup.sh && exec rosrun gazebo_ros gdbrun gzserver $final diff --git a/gazebo_ros/scripts/gazebo b/gazebo_ros/scripts/gazebo index 883aeb48e..b701646ef 100755 --- a/gazebo_ros/scripts/gazebo +++ b/gazebo_ros/scripts/gazebo @@ -49,7 +49,7 @@ if $(kill -0 $! 2> /dev/null); then fi # Kill the server if it is alive -if $(kill -0 $! 2> /dev/null); then +if $(kill -0 $gzserver_pid 2> /dev/null); then # -2 SIGINT valid for Linux and Mac - kill -2 $! + kill -2 $gzserver_pid fi diff --git a/gazebo_ros/scripts/gzclient b/gazebo_ros/scripts/gzclient index 488eb1b79..ceed8cc78 100755 --- a/gazebo_ros/scripts/gzclient +++ b/gazebo_ros/scripts/gzclient @@ -17,12 +17,6 @@ then final="$final -g `catkin_find --first-only libgazebo_ros_paths_plugin.$EXT`" fi -# add ros api plugin if it does not already exist in the passed in arguments -if [ `expr "$final" : ".*libgazebo_ros_api_plugin\.$EXT.*"` -eq 0 ] -then - final="$final -g `catkin_find --first-only libgazebo_ros_api_plugin.$EXT`" -fi - setup_path=$(pkg-config --variable=prefix gazebo)/share/gazebo/ # source setup.sh, but keep local modifications to GAZEBO_MASTER_URI and GAZEBO_MODEL_DATABASE_URI @@ -39,4 +33,4 @@ fi final=$(relocate_remappings "${final}") # Combine the commands -GAZEBO_MASTER_URI="$desired_master_uri" GAZEBO_MODEL_DATABASE_URI="$desired_model_database_uri" gzclient $final +GAZEBO_MASTER_URI="$desired_master_uri" GAZEBO_MODEL_DATABASE_URI="$desired_model_database_uri" exec gzclient $final diff --git a/gazebo_ros/scripts/gzserver b/gazebo_ros/scripts/gzserver index 16c3206b4..7b9a5ef6b 100755 --- a/gazebo_ros/scripts/gzserver +++ b/gazebo_ros/scripts/gzserver @@ -38,4 +38,4 @@ fi final=$(relocate_remappings "${final}") -GAZEBO_MASTER_URI="$desired_master_uri" GAZEBO_MODEL_DATABASE_URI="$desired_model_database_uri" gzserver $final +GAZEBO_MASTER_URI="$desired_master_uri" GAZEBO_MODEL_DATABASE_URI="$desired_model_database_uri" exec gzserver $final diff --git a/gazebo_ros/scripts/perf b/gazebo_ros/scripts/perf index 85b63b30f..c3f117483 100755 --- a/gazebo_ros/scripts/perf +++ b/gazebo_ros/scripts/perf @@ -18,4 +18,4 @@ then fi setup_path=$(pkg-config --variable=prefix gazebo)/share/gazebo/ -. $setup_path/setup.sh && /usr/bin/valgrind --tool=callgrind gzserver $final +. $setup_path/setup.sh && exec /usr/bin/valgrind --tool=callgrind gzserver $final