1
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# =============================================================================
|
||||
# scripts/build.sh —— 在容器内编译所有 ROS2 包
|
||||
#
|
||||
# 修复 doc/01-quickstart.md 步骤 4.2 提到但仓库不存在的 `bash build.sh`。
|
||||
#
|
||||
# 使用:
|
||||
# docker exec ros2_dev bash /root/ros2_ws/scripts/build.sh
|
||||
# make colcon-build (走 docker-compose exec 包装,等价)
|
||||
# =============================================================================
|
||||
# 不用 -u:/opt/ros/humble/setup.bash 里有未定义变量,strict 会炸
|
||||
set -eo pipefail
|
||||
|
||||
WORKSPACE="${WORKSPACE:-/root/ros2_ws}"
|
||||
|
||||
source /opt/ros/humble/setup.bash
|
||||
cd "${WORKSPACE}"
|
||||
|
||||
colcon build --symlink-install \
|
||||
--packages-select \
|
||||
py_pubsub cpp_pubsub py_srv py_action_demo \
|
||||
cpp_robot_tf2 py_vision_demo py_params \
|
||||
cpp_custom_interface py_lifecycle_composable \
|
||||
cpp_qos_demo py_overlay_dds bringup
|
||||
|
||||
echo "[build.sh] ✅ Done. Verify with: ls install/"
|
||||
Reference in New Issue
Block a user