# surround_vision_params.yaml — 4× IMX219 surround vision pipeline
#
# Hardware: Jetson Orin Nano Super / 4× IMX219 160° CSI cameras
# Camera mount: sensor head ring, r=5 cm, 90° intervals, ~0.30 m above floor
#
# ── IMX219 calibration note ─────────────────────────────────────────────────
# Placeholder values are used for the fisheye model (k1=k2=k3=k4=0).
# Run camera_calibration after hardware is assembled:
#
#   ros2 run camera_calibration cameracalibrator \
#     --size 8x6 --square 0.025 \
#     --camera-name camera_front \
#     image:=/camera/front/image_raw \
#     camera:=/camera/front
#
# Then save per-camera calibration to jetson/config/camera_{front,left,rear,right}_info.yaml
# and set camera_info_url in saltybot_cameras/config/cameras_params.yaml.
# ─────────────────────────────────────────────────────────────────────────────

surround_costmap:
  ros__parameters:
    # Physical camera geometry
    camera_height:       0.30     # metres above floor (measure after assembly)
    camera_pitch_deg:    0.0      # positive = tilted down; adjust to match mount

    # Processing resolution (downsampled from 640×480)
    proc_width:          160
    proc_height:         120

    # Obstacle detection range
    min_obstacle_range:  0.25     # metres from camera (ignore extremely close)
    max_obstacle_range:  3.00     # metres from camera

    # Canny edge thresholds (tune for lighting conditions)
    canny_low:           40
    canny_high:          120

    # Z height of published PointCloud2 points (must be within Nav2 obstacle height band)
    obstacle_pub_height: 0.50     # metres (Nav2 filters 0.05–1.5 m by default)

    # Publish rate (Hz). Orin can handle 10 Hz; start at 5 to validate.
    publish_rate:        5.0

surround_vision:
  ros__parameters:
    # Physical camera geometry (must match surround_costmap)
    camera_height:       0.30
    camera_pitch_deg:    0.0

    # IPM input resolution
    ipm_input_width:     160
    ipm_input_height:    120

    # Bird's-eye patch size (pixels). One patch per camera direction.
    ipm_patch_px:        80       # 80×80 px per camera → 160×160 composite

    # Ground range shown per camera (metres from camera to far edge of patch)
    ipm_range_m:         3.0

    # Composite canvas size
    canvas_m:            6.0      # metres per side
    canvas_px:           240      # pixels per side → 0.025 m/pixel

    # Publish rate for bird's-eye image
    publish_rate:        10.0     # Hz
