2026-09-20 12:18:52 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
if [[ ! -f /opt/ros/humble/setup.bash ]]; then
|
|
|
|
|
echo 'NOT RUN: ROS2 Humble is not installed; no ROS compilation claim.' >&2
|
|
|
|
|
exit 2
|
|
|
|
|
fi
|
2026-09-20 13:36:48 +08:00
|
|
|
# Humble's generated environment hooks inspect optional unset variables.
|
|
|
|
|
set +u
|
2026-09-20 12:18:52 +08:00
|
|
|
source /opt/ros/humble/setup.bash
|
2026-09-20 13:36:48 +08:00
|
|
|
set -u
|
2026-09-20 12:18:52 +08:00
|
|
|
command -v colcon >/dev/null || { echo 'colcon is required' >&2; exit 2; }
|
|
|
|
|
bt_repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
|
|
|
|
|
cd "$bt_repo_root"
|
|
|
|
|
# Install/build upstream BehaviorTree.CPP 4.10.0 separately and source its prefix.
|
|
|
|
|
# EXACT REQUIRED intentionally rejects an incompatible system BT.CPP package.
|
|
|
|
|
colcon build --base-paths ros2 --packages-up-to bt_executor robobrain_services bt_mock_servers --event-handlers console_direct+
|
2026-09-22 17:40:25 +08:00
|
|
|
colcon test --packages-select navigation_interfaces bt_skill_interfaces bt_executor --event-handlers console_direct+
|
2026-09-20 12:18:52 +08:00
|
|
|
colcon test-result --verbose
|