cmvr-es/script/test_speedl_reversal_mujoco.sh
lgv ffccdea26d fix(touch): improve reversal planning and enforce speedL limits
Preserve acceleration through same-axis velocity reversal and submit retract
commands immediately after zero-dwell tactile contact. Capture the applied
command's TCP reference and measure signed retract progress, with logging of
the maximum sampled forward displacement after reversal starts.

Support per-command linear jerk in both touch.speed_l and retract, and cap
requested acceleration and jerk at the configured arm limits. Protect command
snapshots and stop completion against newer speedL submissions. Include the
current QP arm and retract parameter tuning and remove an obsolete config field.

Add headless actuator-driven MuJoCo reversal measurement and focused regression
coverage for reversal continuity, controller concurrency, limit enforcement,
and touch jerk configuration.

Validation: cmvr_es and touch_screen_task_test build successfully; 18 focused
regression tests pass, along with headless MuJoCo reversal checks.
2026-09-18 14:40:39 +08:00

23 lines
871 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Headless MuJoCo only. Never initializes the physical robot.
repo_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
build_dir="${CMVR_BUILD_DIR:-${repo_root}/cmake-build-debug}"
cmake --build "$build_dir" --target speedl_reversal_mujoco_test -j 4
cd "$repo_root"
python3 - "$build_dir" "$@" <<'PY'
from pathlib import Path
import os
import sys
build = Path(sys.argv[1]).resolve()
# Prefer every freshly built project library over output/lib's installed copy.
paths = sorted({str(path.parent) for path in build.rglob('*.so')})
paths.append(str(Path('output/lib').resolve()))
env = os.environ.copy()
env['LD_LIBRARY_PATH'] = ':'.join(paths + [env.get('LD_LIBRARY_PATH', '')])
binary = build / 'cmvr-es/devices/arm/motor_robot_arm/speedl_reversal_mujoco_test'
os.execve(str(binary), [str(binary), *sys.argv[2:]], env)
PY