# Consolidated SaltyBot parameters (Issue #447)
# Master configuration for full stack bringup

# ────────────────────────────────────────────────────────────────────────────
<<<<<<< HEAD
# HARDWARE — ESP32 BALANCE Bridge & Motor Control
=======
# HARDWARE — ESP32-S3 Bridge & Motor Control
>>>>>>> 291dd68 (feat: remove all STM32/Mamba/BlackPill references — ESP32-S3 only)
# ────────────────────────────────────────────────────────────────────────────

saltybot_bridge_node:
  ros__parameters:
    serial_port: "/dev/esp32-bridge"
    baud_rate: 921600
    timeout: 0.05
    reconnect_delay: 2.0
    heartbeat_period: 0.2

saltybot_cmd_vel_bridge:
  ros__parameters:
    speed_scale: 1000.0    # m/s → ESC units
    steer_scale: -500.0    # rad/s → ESC units
    deadman_timeout: 0.5   # seconds
    max_linear_vel: 0.5    # m/s (can be overridden at launch)
    ramp_rate: 0.2         # m/s²

# ────────────────────────────────────────────────────────────────────────────
# PERCEPTION — Sensors & Detection
# ────────────────────────────────────────────────────────────────────────────

rplidar_node:
  ros__parameters:
    serial_port: "/dev/rplidar"
    serial_baudrate: 115200
    frame_id: "laser"
    angle_compensate: true

realsense_node:
  ros__parameters:
    camera_name: "camera"
    depth_module:
      profile: "640x480x30"
    rgb_camera:
      profile: "640x480x30"

yolov8_detector:
  ros__parameters:
    confidence_threshold: 0.5
    nms_threshold: 0.4
    input_shape: [640, 640]
    model_path: "/opt/models/yolov8n_coco.engine"
    enable_tracking: true

# ────────────────────────────────────────────────────────────────────────────
# CONTROL — Navigation & Following
# ────────────────────────────────────────────────────────────────────────────

person_follower:
  ros__parameters:
    follow_distance: 1.5   # meters (can be overridden at launch)
    max_linear_vel: 0.5    # m/s (can be overridden at launch)
    max_angular_vel: 1.0   # rad/s
    proportional_gain: 0.3
    derivative_gain: 0.1
    update_rate: 10        # Hz

slam_node:
  ros__parameters:
    rtabmap:
      subscribe_depth: true
      subscribe_scan: true
      map_frame_id: "map"
      odom_frame_id: "odom"
      base_frame_id: "base_link"
      approx_sync: true
      queue_size: 10

nav2:
  ros__parameters:
    planner_server:
      ros__parameters:
        expected_planner_frequency: 10.0
        planner_plugins: ["GridBased"]
    controller_server:
      ros__parameters:
        expected_controller_frequency: 20.0
        controller_plugins: ["FollowPath"]

# ────────────────────────────────────────────────────────────────────────────
# SOCIAL — Communication & Expression
# ────────────────────────────────────────────────────────────────────────────

tts_service:
  ros__parameters:
    voice_model_path: "/opt/models/en_US-cmu_arctic-medium.onnx"
    audio_device: "alsa_output.usb-Jabra.0.analog-stereo"
    speed: 1.0
    pitch: 1.0
    volume: 0.8

gesture_recognition:
  ros__parameters:
    model_complexity: 0          # 0=lite, 1=full, 2=heavy
    process_fps: 10.0
    min_confidence: 0.60
    pose_enabled: true
    hands_enabled: true

face_tracking:
  ros__parameters:
    kp_pan: 1.5
    ki_pan: 0.1
    kd_pan: 0.05
    kp_tilt: 1.2
    ki_tilt: 0.1
    kd_tilt: 0.04
    pan_limit_deg: 90.0
    tilt_limit_deg: 30.0

# ────────────────────────────────────────────────────────────────────────────
# MONITORING — Diagnostics & Logging
# ────────────────────────────────────────────────────────────────────────────

rosbridge_server:
  ros__parameters:
    address: "0.0.0.0"
    port: 9090
    max_message_size: 1000000000

health_monitor:
  ros__parameters:
    heartbeat_timeout: 5.0
    expected_nodes:
      - "robot_state_publisher"
      - "saltybot_bridge"
      - "cmd_vel_bridge"
      - "rplidar_node"
      - "realsense_node"
      - "person_detector"
      - "slam_node"
      - "nav2"
      - "person_follower"
      - "rosbridge_server"

# ────────────────────────────────────────────────────────────────────────────
# HARDWARE CONFIGURATION — Mechanical Parameters
# ────────────────────────────────────────────────────────────────────────────

robot_description:
  ros__parameters:
    # Chassis dimensions
    wheel_diameter: 0.165   # meters
    track_width: 0.365      # meters (center-to-center)
    wheelbase: 0.270        # meters

    # Motor specs
    motor_max_rpm: 300
    motor_gearbox_ratio: 10.0

    # Weight & CoG
    total_weight: 8.0       # kg
    cog_x: 0.0              # offset from base_link
    cog_z: 0.12             # height above ground

# ────────────────────────────────────────────────────────────────────────────
# LAUNCH PROFILES (configured via full_stack.launch.py)
# ────────────────────────────────────────────────────────────────────────────
#
# full (default)
#   - All sensors, perception, control, social components
#   - SLAM + Nav2 for indoor navigation
#   - Person detection + follower
#   - CSI cameras + rosbridge
#
# minimal
#   - Hardware only: bridge + basic sensors (RPLIDAR + RealSense)
#   - No SLAM, no Nav2, no person detection, no follower
#   - No CSI cameras, no rosbridge
#
# headless
#   - Sensors + control: no CSI cameras
#   - RPLIDAR + RealSense + UWB
#   - Limited person detection (no CSI fusion)
#   - No follower, no rosbridge
