Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/kins-unwrap/5axiskins/checkresult
3 changes: 3 additions & 0 deletions tests/kins-unwrap/5axiskins/defaults.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# the module's defaults; B to 120, C past a whole turn
loadrt 5axiskins coordinates=XYZBCW
loadrt walkcheck joints=6 lo=-100,-100,-100,-120,-400,-10 hi=100,100,100,120,400,10
1 change: 1 addition & 0 deletions tests/kins-unwrap/5axiskins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/5axiskins/test.sh
3 changes: 3 additions & 0 deletions tests/kins-unwrap/5axiskins/tool-motion.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# as defaults.hal, with a tool offset handed over as motion does
loadrt 5axiskins coordinates=XYZBCW
loadrt walkcheck joints=6 tool=4,3,12 lo=-100,-100,-100,-120,-400,-10 hi=100,100,100,120,400,10
1 change: 1 addition & 0 deletions tests/kins-unwrap/corexykins/checkresult
3 changes: 3 additions & 0 deletions tests/kins-unwrap/corexykins/defaults.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# a linear map
loadrt corexykins
loadrt walkcheck joints=9 lo=-100,-100,-100,-400,-400,-400,-10,-10,-10 hi=100,100,100,400,400,400,10,10,10
1 change: 1 addition & 0 deletions tests/kins-unwrap/corexykins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/corexykins/test.sh
1 change: 1 addition & 0 deletions tests/kins-unwrap/genhexkins/checkresult
4 changes: 4 additions & 0 deletions tests/kins-unwrap/genhexkins/no-lead.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# a parallel machine, from the pose side
loadrt genhexkins
setp genhexkins.screw-lead 0
loadrt walkcheck joints=6 frompose=1 lo=-5,-5,10,-10,-10,-15 hi=5,5,30,10,10,15
6 changes: 6 additions & 0 deletions tests/kins-unwrap/genhexkins/screw-lead.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# as no-lead.hal with a screw lead; near y = 2 the forward, seeded a
# cycle off, can land on another pose with the same strut lengths, so
# y is held below 1
loadrt genhexkins
setp genhexkins.screw-lead 5
loadrt walkcheck joints=6 frompose=1 lo=-5,-5,10,-10,-10,-15 hi=5,1,30,10,10,15
1 change: 1 addition & 0 deletions tests/kins-unwrap/genhexkins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/genhexkins/test.sh
1 change: 1 addition & 0 deletions tests/kins-unwrap/lineardeltakins/checkresult
4 changes: 4 additions & 0 deletions tests/kins-unwrap/lineardeltakins/defaults.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# a parallel machine, from the pose side; x and y held to 70, so the
# box's corners stay within the arms' reach; a to w pass straight through
loadrt lineardeltakins
loadrt walkcheck joints=9 frompose=1 lo=-70,-70,-300,-400,-400,-400,-10,-10,-10 hi=70,70,-100,400,400,400,10,10,10
1 change: 1 addition & 0 deletions tests/kins-unwrap/lineardeltakins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/lineardeltakins/test.sh
1 change: 1 addition & 0 deletions tests/kins-unwrap/matrixkins/checkresult
10 changes: 10 additions & 0 deletions tests/kins-unwrap/matrixkins/cross-terms.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# a linear map with every cross term set
loadrt matrixkins
setp matrixkins.C_xy 0.02
setp matrixkins.C_xz -0.01
setp matrixkins.C_yx 0.03
setp matrixkins.C_yz 0.015
setp matrixkins.C_zx -0.02
setp matrixkins.C_zy 0.01
setp matrixkins.C_zz 1.001
loadrt walkcheck joints=9 lo=-100,-100,-100,-400,-400,-400,-10,-10,-10 hi=100,100,100,400,400,400,10,10,10
1 change: 1 addition & 0 deletions tests/kins-unwrap/matrixkins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/matrixkins/test.sh
1 change: 1 addition & 0 deletions tests/kins-unwrap/maxkins/checkresult
5 changes: 5 additions & 0 deletions tests/kins-unwrap/maxkins/pivot.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# a pivot length of 100, the size of the box; B to 120, C past a whole turn,
# and A, which passes straight through
loadrt maxkins
setp maxkins.pivot-length 100
loadrt walkcheck joints=9 lo=-100,-100,-100,-400,-120,-400,-10,-10,-10 hi=100,100,100,400,120,400,10,10,10
1 change: 1 addition & 0 deletions tests/kins-unwrap/maxkins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/maxkins/test.sh
1 change: 1 addition & 0 deletions tests/kins-unwrap/millturn/checkresult
3 changes: 3 additions & 0 deletions tests/kins-unwrap/millturn/defaults.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# the module's defaults; the rotary past a whole turn
loadrt millturn
loadrt walkcheck joints=4 lo=-100,-100,-100,-400 hi=100,100,100,400
1 change: 1 addition & 0 deletions tests/kins-unwrap/millturn/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/millturn/test.sh
1 change: 1 addition & 0 deletions tests/kins-unwrap/pentakins/checkresult
5 changes: 5 additions & 0 deletions tests/kins-unwrap/pentakins/defaults.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# a parallel machine, from the pose side; past a = 5 this geometry nears
# a singularity, where the forward can land on another pose with the
# same strut lengths, so a is held below it
loadrt pentakins
loadrt walkcheck joints=5 frompose=1 lo=-20,-20,-10,-15,-15 hi=20,20,10,5,15
1 change: 1 addition & 0 deletions tests/kins-unwrap/pentakins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/pentakins/test.sh
3 changes: 3 additions & 0 deletions tests/kins-unwrap/pumakins/walk-elbow.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# the elbow, joint 3, from 150
loadrt pumakins
loadrt walkcheck start=20,-20,150,30,35,40 mask=4
3 changes: 3 additions & 0 deletions tests/kins-unwrap/pumakins/walk-shoulder.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# the shoulder, joint 2, from 150
loadrt pumakins
loadrt walkcheck start=20,150,100,30,35,40 mask=2
3 changes: 3 additions & 0 deletions tests/kins-unwrap/pumakins/walk-waist.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# the waist, joint 1, from 150
loadrt pumakins
loadrt walkcheck start=150,-20,100,30,35,40 mask=1
6 changes: 6 additions & 0 deletions tests/kins-unwrap/pumakins/walk-wrist.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The walks pumakins-unwrap took for #4585 and #4708. The wrist pitch,
# joint 5, is left out: at +-180 the wrist is folded back on itself, a
# singularity where joints 4 and 6 are not determined.
# joints 4 and 6 together from 150 and 140
loadrt pumakins
loadrt walkcheck start=20,-20,100,150,35,140 mask=40
11 changes: 0 additions & 11 deletions tests/kins-unwrap/pumakins/walks

This file was deleted.

3 changes: 3 additions & 0 deletions tests/kins-unwrap/pumakins/wrist-down.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# as wrist-up.hal, the wrist pitch -170 to -10
loadrt pumakins
loadrt walkcheck joints=6 lo=-400,-100,-100,-400,-170,-400 hi=400,100,100,400,-10,400
6 changes: 6 additions & 0 deletions tests/kins-unwrap/pumakins/wrist-up.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# the base and the wrist roll past a whole turn; the wrist pitch 10 to
# 170, off the straight and folded wrist where joints 4 and 6 are not
# determined. The forward sets the wrist flip from the pitch's sign, so
# each sign is its own case.
loadrt pumakins
loadrt walkcheck joints=6 lo=-400,-100,-100,-400,10,-400 hi=400,100,100,400,170,400
1 change: 1 addition & 0 deletions tests/kins-unwrap/rotarydeltakins/checkresult
3 changes: 3 additions & 0 deletions tests/kins-unwrap/rotarydeltakins/defaults.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# a parallel machine, from the pose side; a to w pass straight through
loadrt rotarydeltakins
loadrt walkcheck joints=9 frompose=1 lo=-5,-5,-15,-400,-400,-400,-10,-10,-10 hi=5,5,-8,400,400,400,10,10,10
1 change: 1 addition & 0 deletions tests/kins-unwrap/rotarydeltakins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/rotarydeltakins/test.sh
1 change: 1 addition & 0 deletions tests/kins-unwrap/rotatekins/checkresult
3 changes: 3 additions & 0 deletions tests/kins-unwrap/rotatekins/defaults.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# one rotation
loadrt rotatekins
loadrt walkcheck joints=9 lo=-100,-100,-100,-400,-400,-400,-10,-10,-10 hi=100,100,100,400,400,400,10,10,10
1 change: 1 addition & 0 deletions tests/kins-unwrap/rotatekins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/rotatekins/test.sh
4 changes: 4 additions & 0 deletions tests/kins-unwrap/scarakins/sim-limits.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# the sim arm's own limits on joint 0, and the elbow both ways; a and b
# pass straight through
loadrt scarakins
loadrt walkcheck joints=6 lo=-360,-170,-100,-400,-400,-400 hi=360,170,100,400,400,400
3 changes: 3 additions & 0 deletions tests/kins-unwrap/scarakins/walk-elbow-neg.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# joint 0 across 180 with the elbow bent the other way
loadrt scarakins
loadrt walkcheck start=150,-30,0,0,0,0 mask=1
3 changes: 3 additions & 0 deletions tests/kins-unwrap/scarakins/walk-elbow-pos.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# joint 0 across 180 with the elbow bent one way
loadrt scarakins
loadrt walkcheck start=150,30,0,0,0,0 mask=1
3 changes: 0 additions & 3 deletions tests/kins-unwrap/scarakins/walks

This file was deleted.

1 change: 1 addition & 0 deletions tests/kins-unwrap/scorbot-kins/checkresult
4 changes: 4 additions & 0 deletions tests/kins-unwrap/scorbot-kins/one-arm.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# scorbot-kins solves one arm: the wrist in front of the base and the
# elbow up, which with links of one length means joint 1 above joint 2
loadrt scorbot-kins
loadrt walkcheck joints=5 lo=-150,40,-85,-90,-400 hi=150,90,30,90,400
1 change: 1 addition & 0 deletions tests/kins-unwrap/scorbot-kins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/scorbot-kins/test.sh
13 changes: 7 additions & 6 deletions tests/kins-unwrap/shared-checkresult
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh
# every walk in walks ran and held
n=$(grep -cv '^[[:space:]]*\(#\|$\)' "$(dirname "$1")/walks")
[ "$n" -ge 1 ] \
&& [ "$(grep -c '^=== ' "$1")" = "$n" ] \
&& [ "$(grep -c 'joints continuous' "$1")" = "$n" ] \
&& ! grep -q "FAIL" "$1"
# every case ran and held
result=$1
set -- "$(dirname "$result")"/*.hal
[ -e "$1" ] \
&& [ "$(grep -c '^=== ' "$result")" = "$#" ] \
&& [ "$(grep -c 'round trip holds' "$result")" = "$#" ] \
&& ! grep -q "FAIL" "$result"
22 changes: 10 additions & 12 deletions tests/kins-unwrap/shared-test.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
#!/bin/bash
# Walk kinematics joints across +-180 the way motion calls them. Each
# line of walks is a module and the walkcheck arguments for one walk.
# One directory per module, so runtests -j runs them side by side.
# Round-trip kinematics modules the way motion calls them, along walks and
# at random points of their range. Each case is a hal file. One directory
# per module, so runtests -j runs them side by side.
set -e

[ -r walks ] || { echo "Error: file 'walks' does not exist"; exit 1; }
set -- *.hal
[ -e "$1" ] || { echo "Error: no case files"; exit 1; }

halcompile --install ../walkcheck.c >/dev/null

# every walk runs, so one failure does not hide the next
# every case runs, so one failure does not hide the next
status=0
while read -r kins args; do
case "$kins" in ''|'#'*) continue ;; esac
printf 'loadrt %s\nloadrt walkcheck %s\n' "$kins" "$args" > walk.hal
echo "=== $kins $args"
halrun -f walk.hal < /dev/null || status=1
done < walks
rm -f walk.hal
for f in "$@"; do
echo "=== $f"
halrun -f "$f" < /dev/null || status=1
done
exit $status
3 changes: 3 additions & 0 deletions tests/kins-unwrap/three21kins/walk-elbow.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pumakins' walk-elbow.hal: three21kins carries its solver
loadrt three21kins
loadrt walkcheck start=20,-20,150,30,35,40 mask=4
3 changes: 3 additions & 0 deletions tests/kins-unwrap/three21kins/walk-shoulder.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pumakins' walk-shoulder.hal: three21kins carries its solver
loadrt three21kins
loadrt walkcheck start=20,150,100,30,35,40 mask=2
3 changes: 3 additions & 0 deletions tests/kins-unwrap/three21kins/walk-waist.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pumakins' walk-waist.hal: three21kins carries its solver
loadrt three21kins
loadrt walkcheck start=150,-20,100,30,35,40 mask=1
3 changes: 3 additions & 0 deletions tests/kins-unwrap/three21kins/walk-wrist.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pumakins' walk-wrist.hal: three21kins carries its solver
loadrt three21kins
loadrt walkcheck start=20,-20,100,150,35,140 mask=40
5 changes: 0 additions & 5 deletions tests/kins-unwrap/three21kins/walks

This file was deleted.

3 changes: 3 additions & 0 deletions tests/kins-unwrap/three21kins/wrist-down.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# as pumakins/wrist-down.hal
loadrt three21kins
loadrt walkcheck joints=6 lo=-400,-100,-100,-400,-170,-400 hi=400,100,100,400,-10,400
3 changes: 3 additions & 0 deletions tests/kins-unwrap/three21kins/wrist-up.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# as pumakins/wrist-up.hal: three21kins carries pumakins' solver
loadrt three21kins
loadrt walkcheck joints=6 lo=-400,-100,-100,-400,10,-400 hi=400,100,100,400,170,400
1 change: 1 addition & 0 deletions tests/kins-unwrap/tripodkins/checkresult
7 changes: 7 additions & 0 deletions tests/kins-unwrap/tripodkins/scaled.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# a parallel machine, from the pose side; walkcheck's box is in whole
# units, so the base is scaled up: B at (20, 0), C at (10, 20)
loadrt tripodkins
setp tripodkins.Bx 20
setp tripodkins.Cx 10
setp tripodkins.Cy 20
loadrt walkcheck joints=3 frompose=1 lo=5,5,10 hi=15,15,30
1 change: 1 addition & 0 deletions tests/kins-unwrap/tripodkins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/tripodkins/test.sh
1 change: 1 addition & 0 deletions tests/kins-unwrap/trivkins/checkresult
4 changes: 4 additions & 0 deletions tests/kins-unwrap/trivkins/gantry.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# the gantry, from the pose side: two joints drive Y, and the inverse
# has to set both
loadrt trivkins coordinates=XYZY kinstype=BOTH
loadrt walkcheck joints=4 frompose=1 lo=-100,-100,-100 hi=100,100,100
3 changes: 3 additions & 0 deletions tests/kins-unwrap/trivkins/nine-axes.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# the identity on all nine axes
loadrt trivkins coordinates=XYZABCUVW
loadrt walkcheck joints=9 lo=-100,-100,-100,-400,-400,-400,-10,-10,-10 hi=100,100,100,400,400,400,10,10,10
1 change: 1 addition & 0 deletions tests/kins-unwrap/trivkins/skip
1 change: 1 addition & 0 deletions tests/kins-unwrap/trivkins/test.sh
Loading