grid_astar_theta_planner:
  ros__parameters:
    use_sim_time: false

    # Inputs:
    # - /odom gives the fused current robot pose.
    # - /goal_pose gives the target pose (x, y, yaw).
    # - /global_costmap/costmap is nav_msgs/OccupancyGrid.
    # - /random_obstacles is std_msgs/Float32MultiArray.
    #   obstacle_format=xyr means [x, y, radius, x, y, radius, ...].
    map_frame: map
    odom_topic: /odom
    goal_pose_topic: /goal_pose
    obstacles_topic: /random_obstacles
    clear_obstacles_topic: /clear_random_obstacles
    costmap_topic: /global_costmap/costmap
    plan_topic: /plan
    status_topic: /ackermann_lattice_status

    # Fallback map bounds in map_frame. When a costmap arrives in map frame,
    # bounds are taken from that OccupancyGrid by default.
    map_min_x: -5.0
    map_min_y: -5.0
    map_max_x: 5.0
    map_max_y: 5.0
    resolution: 0.10
    fit_map_to_costmap: true

    # OccupancyGrid fusion. Unknown is blocked by default for safety.
    costmap_occupied_threshold: 50
    unknown_is_obstacle: true
    outside_costmap_is_obstacle: true

    # Random circular cone obstacles. Inflation is:
    # max(obstacle_radius, unknown_obstacle_radius)
    # + robot_radius + localization_error + latency_margin + safety_margin.
    obstacle_format: xyr
    default_obstacle_radius: 0.15
    unknown_obstacle_radius: 0.15
    accumulate_obstacles: true
    obstacle_merge_distance: 0.20
    robot_radius: 0.14
    localization_error: 0.10
    latency_margin: 0.05
    safety_margin: 0.05

    # Lightweight Hybrid A*/state-lattice search.
    min_turning_radius: 0.40
    yaw_bins: 72
    primitive_length: 0.12
    collision_sample_step: 0.03
    goal_xy_tolerance: 0.20
    goal_yaw_tolerance: 0.174533
    reverse_penalty: 1.3
    turn_penalty: 0.05
    gear_change_penalty: 0.20
    steering_change_penalty: 0.02
    plan_on_obstacle_update: true
    max_iterations: 50000
    planning_timeout_ms: 100.0
    replan_rate: 2.0

    max_odom_age: 0.80
    tf_timeout: 0.05
