Skip to content

Commit fdd3f2f

Browse files
committed
test: home qtdragon ui-smoke in place to fix RT/non-RT homing race
qtdragon phase-2 intermittently failed with homed=[0,0,0] after the 60s home timeout. As BsAtHome noted, an RT/non-RT homing race under CI load. The qtdragon sim homes by moving each joint into a simulated switch (HOME_SEARCH_VEL > 0). That RT search-move races the non-RT task under load and can stall with joints never homed; motion_mode is already free when it hangs, so it is not a teleop/mode issue. The stable sims (touchy) home in place with HOME_SEARCH_VEL=0. Zero HOME_SEARCH_VEL/HOME_LATCH_VEL in the test's config mirror so qtdragon homes in place. Shipped config untouched; the test checks a position delta, so the home offset does not matter. Also log motion_mode in the home WARN/timeout lines (that is what ruled out a teleop race).
1 parent c0333dc commit fdd3f2f

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

tests/ui-smoke/_lib/drive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,16 @@ def home_all(cmd, stat, timeout):
121121
cmd.home(-1)
122122
sys.stderr.write(
123123
f"WARN: re-issued home(-1); homed={list(stat.homed[:njoints])} "
124-
f"task_state={stat.task_state} task_mode={stat.task_mode}\n")
124+
f"task_state={stat.task_state} task_mode={stat.task_mode} "
125+
f"motion_mode={stat.motion_mode}\n")
125126
next_reissue = time.monotonic() + HOME_REISSUE_S
126127
time.sleep(POLL_INTERVAL_S)
127128
stat.poll()
128129
sys.stderr.write(
129130
f"UI_SMOKE_FAIL: timeout waiting for all joints homed after "
130131
f"{timeout}s; homed={list(stat.homed[:njoints])} "
131132
f"task_state={stat.task_state} task_mode={stat.task_mode} "
133+
f"motion_mode={stat.motion_mode} "
132134
f"exec_state={stat.exec_state} njoints={njoints}\n")
133135
return False
134136

tests/ui-smoke/qtdragon/test.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ cp -r "$SRC_DIR/." "$WORK_DIR/"
3737
sed -i 's|^LOG_FILE = qtdragon\.log$|LOG_FILE = ~/qtdragon.log|' \
3838
"$WORK_DIR/qtdragon_metric.ini"
3939

40+
# Home in place. The shipped config homes by moving each joint into a
41+
# simulated switch (HOME_SEARCH_VEL > 0); that RT search-move races the
42+
# non-RT task under CI load and intermittently leaves joints unhomed
43+
# (BsAtHome). The smoke test only needs joints homed, so zero the
44+
# search/latch velocities. Mirror only; shipped config untouched.
45+
sed -i 's|^\(HOME_SEARCH_VEL\)\([[:space:]]*\)=.*|\1\2= 0|; \
46+
s|^\(HOME_LATCH_VEL\)\([[:space:]]*\)=.*|\1\2= 0|' \
47+
"$WORK_DIR/qtdragon_metric.ini"
48+
4049
export LINUXCNC_OPENGL_PLATFORM=offscreen
4150
export QT_QPA_PLATFORM=offscreen
4251

0 commit comments

Comments
 (0)