# saltybot_fleet — default parameters
#
# Override per-robot values at launch time:
#   ros2 launch saltybot_fleet fleet_robot.launch.py robot_id:=saltybot_2 robot_namespace:=/saltybot_2
#
# Fleet topic layout:
#   /fleet/maps                     MapChunk      — robot → coordinator (compressed grids)
#   /fleet/robots                   RobotInfo     — heartbeat / status (all robots)
#   /fleet/merged_map               OccupancyGrid — coordinator → all  (merged map)
#   /fleet/exploration_frontiers    FrontierArray — coordinator → all  (consolidated frontiers)
#   /fleet/status                   String (JSON) — coordinator health
#
# Per-robot topics (namespaced):
#   /<robot_ns>/rtabmap/map         OccupancyGrid — local RTAB-Map output
#   /<robot_ns>/rtabmap/odom        Odometry      — local odometry
#   /<robot_ns>/navigate_to_pose    Nav2 action   — local navigation

# ── Fleet coordinator ──────────────────────────────────────────────────────────
fleet_manager:
  ros__parameters:
    heartbeat_timeout_sec: 10.0    # seconds before a silent robot is considered lost
    merge_hz:              2.0     # merged map publish rate (Hz)
    frontier_timeout_sec:  60.0    # re-assign frontier if robot silent this long
    map_resolution:        0.05    # all robots MUST match this (RTAB-Map Grid/CellSize)

# ── Frontier detector ──────────────────────────────────────────────────────────
frontier_detector:
  ros__parameters:
    detection_hz:       1.0        # frontier detection rate
    min_frontier_cells: 10         # minimum frontier cluster size (cells)

# ── Per-robot: map broadcaster ────────────────────────────────────────────────
# Override robot_id / robot_namespace per robot at launch.
map_broadcaster:
  ros__parameters:
    robot_id:        'saltybot_1'
    robot_namespace: '/saltybot_1'
    broadcast_hz:    1.0

# ── Per-robot: cooperative explorer ──────────────────────────────────────────
fleet_explorer:
  ros__parameters:
    robot_id:         'saltybot_1'
    robot_namespace:  '/saltybot_1'
    exploration_hz:   0.5          # state machine tick rate
    goal_tolerance_m: 0.5          # distance threshold to declare frontier reached
    nav_timeout_sec:  120.0        # cancel Nav2 goal after this long
    backoff_sec:      5.0          # wait after stall before requesting new frontier
    battery_min_pct:  20.0         # stop exploration below this battery level
