diff --git a/env-hooks/99.hero_functions.bash b/env-hooks/99.hero_functions.bash index 44e4065d..78d28ce8 100644 --- a/env-hooks/99.hero_functions.bash +++ b/env-hooks/99.hero_functions.bash @@ -7,7 +7,8 @@ install_services_cmd="" for launch_file in ${launch_files}; do launch_file_name=$(echo ${launch_file##*/} | cut -d"." -f1) name=${bringup_name//_/-}-${launch_file_name//_/-} - if [[ $launch_file == *"state_machines"* ]]; then + if [[ $launch_file == *"state_machines"* ]] + then eval "${name}() { export ROBOT_BRINGUP_PATH=${package_path} && rosnode kill /state_machine; roslaunch ${launch_file} \$@; }" else eval "${name}() { export ROBOT_BRINGUP_PATH=${package_path} && roslaunch ${launch_file} \$@; }" @@ -17,3 +18,4 @@ for launch_file in ${launch_files}; do done eval "${bringup_name}-install-services() { echo 'Installing systemd services for ${bringup_name} ...' $install_services_cmd; }" +unset install_services_cmd