Files
magrob/scripts/run_bt.sh
2026-02-06 19:47:33 +01:00

22 lines
471 B
Bash
Executable File

#!/bin/bash
ros_distro="jazzy"
script_dir=$(dirname "$(readlink -f "${bash_source[0]}")")
pids=()
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
source "/opt/ros/${ROS_DISTRO}/setup.bash"
source "./install/setup.bash"
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
ros2 launch mg_bringup bt.launch.py & pids+=($!)
sleep 1
ros2 action send_goal /mg_bt_action_server btcpp_ros2_interfaces/action/ExecuteTree "target_tree: $1" & pids+=($!)
wait