#!/bin/bash

set -euo pipefail

killall -15 zci_node_main_private || echo "zci_node_main_private was not running."
killall -15 dds_bridge_node_private || echo "dds_bridge_node_private was not running."
killall -15 online_sim_private || echo "online_sim_private was not running."
killall -15 sim_to_emu_bridge || echo "sim to emu was not running"

if pgrep -f roscore
then
  pkill -f roscore
else
  echo "roscore was not running"
fi

if pgrep -f run_server
then
  pkill -f run_server
else
  echo "ach_server was not running"
fi
