| name | patrol |
| description | Patrols a route back and forth between two points, scanning side to side, via a looping sequence of root waypoints. Use when a command mentions patrol, walk a patrol, guard route, march a beat, or pace a patrol back and forth. |
| category | locomotion |
| disable-model-invocation | true |
| subskills | ["walk","turn-and-face","move-head-and-neck"] |
patrol
Walk out to a point, turn, and walk back — repeating — with the head scanning. A looping sequence whose root returns to start each lap.
Composes: walk + turn-and-face + move-head-and-neck
How
- Use a
sequence with loop:true. Frame root is ABSOLUTE; compute the travel axis from state.position+state.faceDeg (0=+Z, 90=+X). The example assumes origin facing +Z.
- Waypoints: advance (
z up, scan head), flip faceDeg 180, return (z to 0), flip back — so each lap is self-consistent.
- Long
durationMs (~6000).
Example
- "patrol the area" ->
{"durationMs":6000,"say":"On patrol.","sequence":{"loop":true,"frames":[{"t":0,"root":{"x":0,"z":0,"faceDeg":0},"pose":{"Neck":[0,30,0]}},{"t":0.4,"root":{"x":0,"z":3,"faceDeg":0},"pose":{"Neck":[0,-30,0]}},{"t":0.5,"root":{"x":0,"z":3,"faceDeg":180}},{"t":0.9,"root":{"x":0,"z":0,"faceDeg":180},"pose":{"Neck":[0,30,0]}},{"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.