| name | walk-a-square |
| description | Walks a square path and returns to the start, turning 90 degrees at each corner, via a sequence of root waypoints. Use when a command mentions walk a square, walk in a square, do a box pattern walking, or trace a square on the floor. |
| category | locomotion |
| disable-model-invocation | true |
| subskills | ["walk","turn-and-face"] |
walk-a-square
Trace a square: walk a side, turn 90, repeat four times, back to start.
Composes: walk + turn-and-face
How
- Use a
sequence with loop:false. Frame root is ABSOLUTE; compute the travel axis from state.position+state.faceDeg (0=+Z, 90=+X). The example assumes origin facing +Z.
- Four equal sides with
faceDeg 0, 90, 180, 270 at the corners; finish back at the start.
durationMs ~5600.
Example
- "walk in a square" ->
{"durationMs":5600,"say":"Walking a square.","sequence":{"loop":false,"frames":[{"t":0,"root":{"x":0,"z":0,"faceDeg":0}},{"t":0.25,"root":{"x":0,"z":2,"faceDeg":0}},{"t":0.45,"root":{"x":2,"z":2,"faceDeg":90}},{"t":0.7,"root":{"x":2,"z":0,"faceDeg":180}},{"t":0.9,"root":{"x":0,"z":0,"faceDeg":270}},{"t":1,"root":{"x":0,"z":0,"faceDeg":0}}]}}
Limits & posture
Keep ≥1 foot grounded except at a jump's airborne apex; stay inside human joint ranges and keep weight over the support — see balance-and-posture.