# UWB Geofence Zones Configuration
# All coordinates are in the UWB local frame (metres, X-forward, Y-left)
#
# emergency_boundary: outer hard limit — robot must stay inside.
#   If it exits, cmd_vel_limited is zeroed and /saltybot/geofence_violation
#   is latched True (triggers e-stop cascade).
#
# zones: list of named speed-limit regions.
#   vertices: flat [x1, y1, x2, y2, ...] polygon, at least 3 points.
#   max_speed:   m/s  (linear)
#   max_angular: rad/s (yaw)
#   The most restrictive zone the robot is currently inside wins.
#   Transitions between limits are smoothed over `transition_time` seconds.

# ── Emergency boundary (6 m × 10 m space, centred at origin) ─────────────────
emergency_boundary:
  vertices:
    [-6.0, -5.0,
      6.0, -5.0,
      6.0,  5.0,
     -6.0,  5.0]

# ── Named speed-limit zones ───────────────────────────────────────────────────
zones:
  # Caution perimeter — 1 m inside the emergency boundary
  - name: caution_perimeter
    description: "Slow near room walls (1 m buffer inside emergency boundary)"
    max_speed: 0.4
    max_angular: 0.8
    vertices:
      [-5.0, -4.0,
        5.0, -4.0,
        5.0,  4.0,
       -5.0,  4.0]

  # Dock approach — slow zone in front of the docking station (positive Y end)
  - name: dock_approach
    description: "Very slow approach corridor to docking station"
    max_speed: 0.15
    max_angular: 0.3
    vertices:
      [-0.75, 2.5,
        0.75, 2.5,
        0.75, 4.5,
       -0.75, 4.5]

  # Static obstacle cluster A (example — update to match your layout)
  - name: obstacle_cluster_a
    description: "Caution zone around obstacle cluster near (+2, -1)"
    max_speed: 0.25
    max_angular: 0.5
    vertices:
      [1.0, -2.0,
       3.0, -2.0,
       3.0,  0.0,
       1.0,  0.0]
