# safety_zone_params.yaml — RPLIDAR 360° safety zone detector (Issue #575)
#
# Node: saltybot_safety_zone
#
# Usage:
#   ros2 launch saltybot_safety_zone safety_zone.launch.py
#
# Zone thresholds:
#   DANGER  < danger_range_m   → latching e-stop (if in forward arc)
#   WARN    < warn_range_m     → caution / speed reduction (advisory)
#   CLEAR   otherwise
#
# E-stop clear:
#   ros2 service call /saltybot/safety_zone/clear_estop std_srvs/srv/Trigger

safety_zone:
  ros__parameters:

    # ── Zone thresholds ──────────────────────────────────────────────────────
    danger_range_m: 0.30    # m — obstacle closer than this → DANGER
    warn_range_m:   1.00    # m — obstacle closer than this → WARN

    # ── Sector grid ──────────────────────────────────────────────────────────
    n_sectors: 36           # 360 / 36 = 10° per sector

    # ── E-stop trigger arc ───────────────────────────────────────────────────
    forward_arc_deg:        60.0   # ±30° from robot forward (+X / 0°)
    estop_all_arcs:         false  # true = any sector triggers (360° e-stop)
    estop_debounce_frames:  2      # consecutive DANGER scans before latch

    # ── Range validity ───────────────────────────────────────────────────────
    min_valid_range_m: 0.05    # ignore readings closer than this (sensor noise)
    max_valid_range_m: 12.00   # RPLIDAR A1M8 nominal max range

    # ── Publish rate ─────────────────────────────────────────────────────────
    publish_rate: 10.0     # Hz — /saltybot/safety_zone/status publish rate
                            #      /saltybot/safety_zone publishes every scan

    # ── cmd_vel topics ───────────────────────────────────────────────────────
    # Safety zone node intercepts cmd_vel from upstream, overrides to zero on estop.
    # Typical chain:
<<<<<<< HEAD
    #   cmd_vel_mux → /cmd_vel_safe → [safety_zone: cmd_vel_input] → /cmd_vel → ESP32 BALANCE
    cmd_vel_input_topic:  /cmd_vel_input   # upstream velocity (remap as needed)
    cmd_vel_output_topic: /cmd_vel         # downstream (to ESP32 bridge)
=======
    #   cmd_vel_mux → /cmd_vel_safe → [safety_zone: cmd_vel_input] → /cmd_vel → ESP32-S3
    cmd_vel_input_topic:  /cmd_vel_input   # upstream velocity (remap as needed)
    cmd_vel_output_topic: /cmd_vel         # downstream (to ESP32-S3 bridge)
>>>>>>> 291dd68 (feat: remove all STM32/Mamba/BlackPill references — ESP32-S3 only)
