# saltybot_scene — default parameters
#
# YOLOv8-nano TRT engine:
#   Build with: ros2 run saltybot_scene build_scene_trt
#   Place at:   /config/yolov8n_scene.engine
#
# Room classifier engine (optional, falls back to rule_based):
#   Build with: ros2 run saltybot_scene build_scene_trt --room
#   Place at:   /config/room_classifier.engine

scene_detector:
  ros__parameters:
    # YOLOv8-nano TRT FP16 engine (built from ONNX via build_scene_trt.py)
    engine_path:      '/config/yolov8n_scene.engine'
    onnx_path:        '/config/yolov8n_scene.onnx'

    # MobileNetV2 room classifier (optional — rule_based is the fallback)
    room_engine_path: '/config/room_classifier.engine'
    room_onnx_path:   '/config/room_classifier.onnx'

    # Detection thresholds
    conf_threshold:   0.35      # YOLOv8 confidence threshold
    iou_threshold:    0.45      # NMS IoU threshold

    # Rate control
    room_update_hz:   2.0       # room classification rate (decimated from 30Hz input)
    max_depth_m:      6.0       # ignore depth readings beyond this

    # Debug annotated image (disable in production to save bandwidth)
    publish_debug:    false

behavior_adapter:
  ros__parameters: {}   # all params are hardcoded speed/personality tables

costmap_publisher:
  ros__parameters:
    max_obstacle_distance_m: 4.0   # ignore objects farther than this
    min_confidence:          0.40   # discard low-confidence detections from costmap
    obstacle_frame:         'base_link'
    publish_markers:         true   # RViz MarkerArray on /social/scene/object_markers


# ── Nav2 obstacle_layer integration ──────────────────────────────────────────
# Add to your local_costmap config in nav2_params.yaml:
#
# local_costmap:
#   local_costmap:
#     ros__parameters:
#       plugins: ["voxel_layer", "inflation_layer", "scene_obstacle_layer"]
#       scene_obstacle_layer:
#         plugin: "nav2_costmap_2d::ObstacleLayer"
#         observation_sources: scene_objects
#         scene_objects:
#           topic: /social/scene/obstacle_cloud
#           data_type: PointCloud2
#           min_obstacle_height: 0.0
#           max_obstacle_height: 2.0
#           marking: true
#           clearing: true
#           obstacle_max_range: 4.0
#           raytrace_max_range: 4.5
