Added convinence scripts for running base/behavior tree

This commit is contained in:
2026-01-05 00:33:51 +01:00
parent b724a7a679
commit 457307a656
2 changed files with 28 additions and 0 deletions

19
scripts/run_bt.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
ros_distro="jazzy"
script_dir=$(dirname "$(readlink -f "${bash_source[0]}")")
pids=()
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