Add robot setup command and configuration management for cobot-setting.yaml

This commit is contained in:
Даниил Грабарь
2026-05-20 14:43:20 +10:00
parent dedf3e3467
commit 86e6e801e9
7 changed files with 435 additions and 6 deletions
+7 -1
View File
@@ -12,9 +12,14 @@
set -e
IMAGE="${WEBOTS_IMAGE:-evilfisru/lwc:webots-jazzy}"
IMAGE="${WEBOTS_IMAGE:-evilfisru/lwc:webots-jazzy-dev}"
GPU_MODE="software"
# Resolve the project root (two levels above this script: docker/jazzy/ros-iiwa7-webots → project root)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
CONFIG_FILE="${PROJECT_ROOT}/cobot-setting.yaml"
# Parse --gpu flag
if [[ "${1}" == "--gpu" ]]; then
GPU_MODE="${2:?--gpu requires an argument: nvidia|mesa|software}"
@@ -58,5 +63,6 @@ docker run -it --rm \
-e QT_X11_NO_MITSHM=1 \
"${RENDER_FLAGS[@]}" \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
${CONFIG_FILE:+-v "${CONFIG_FILE}:/ros2_ws/cobot-setting.yaml:ro"} \
"${IMAGE}" \
"$@"