base_local_planner: nav_core_adapter::LocalPlannerAdapter
LocalPlannerAdapter:
  planner_name: dwb_local_planner::DWBLocalPlanner
DWBLocalPlanner:
  # Robot configuration
  max_vel_x: 1.5
  min_vel_x: -0.3

  max_vel_y: 0.0  # diff drive robot
  min_vel_y: 0.0  # diff drive robot

  max_speed_xy: 2.0    # max_trans_vel: 0.8  # choose slightly less than the base's capability
  min_speed_xy: 0.1    # min_trans_vel: 0.1  # this is the min trans velocity when there is negligible rotational velocity

  max_vel_theta: 1.0    # max_rot_vel: 1.0  # choose slightly less than the base's capability
  min_speed_theta: 0.1  # min_rot_vel: 0.1 default: 0.4  # this is the min angular velocity when there is negligible translational velocity

  acc_lim_x: 0.4
  acc_lim_y: 0.0      # diff drive robot
  acc_lim_theta: 1.0
  decel_lim_x: -1.0
  decel_lim_y: -0.0
  decel_lim_theta: -1.0

  # Goal tolerance
  yaw_goal_tolerance: 0.03  # yaw_goal_tolerance > (sim_time * min_rot_vel) / 2 (from Navigation Tuning Guide)
  xy_goal_tolerance: 0.05   # xy_goal_tolerance  > (sim_time * min_vel_x)   / 2
  # latch_xy_goal_tolerance: true

  # Whether to split the path into segments or not
  # Requires https://github.com/locusrobotics/robot_navigation/pull/50
  split_path: true

  # Forward simulation (trajectory generation)
  trajectory_generator_name: dwb_plugins::StandardTrajectoryGenerator # or dwb_plugins::LimitedAccelGenerator
  sim_time: 1.2
  vx_samples: 12
  vy_samples: 1       # diff drive robot, there is only one sample
  vtheta_samples: 12
  discretize_by_time: true
  angular_granularity: 0.05
  linear_granularity: 0.1
  # sim_period
  include_last_point: true

  # Goal checking
  goal_checker_name: dwb_plugins::SimpleGoalChecker
  # stateful: true

  # Critics (trajectory scoring)
  # default_critic_namespaces: [dwb_critics, mir_dwb_critics]
  critics: [RotateToGoal, ObstacleFootprint, PathAlign, PathDistPruned, PathProgress]
  # critics: [MetratronikTechnik]
  # MetratronikTechnik:
  #   scale: 0.01
  #   sq_window: 1.0
  #   xy_goal_tolerance: 0.02
  #   trans_stopped_velocity: 0.3
  #   slowing_factor: 1.0
  #   angle_threshold: 0.436332313
  #   Lm: 0.25
  RotateToGoal:
    scale: 100.0
    trans_stopped_velocity: 0.25
    lookahead_time: -1.0
    slowing_factor: 10.0
  ObstacleFootprint:
    scale: 0.01             # default: 0.01  mir: 0.01  - weighting for how much the controller should avoid obstacles
    max_scaling_factor: 0.5 # default: 0.2   mir: 0.2   - how much to scale the robot's footprint when at speed.
    scaling_speed: 0.25     # default: 0.25  mir: 0.25  - absolute velocity at which to start scaling the robot's footprint
    sum_scores: false       # if true, return sum of scores of all trajectory points instead of only last one
  PathAlign:
    scale: 16.0
    forward_point_distance: 0.325 # default: 0.325 mir: 0.325 - how far along to place an additional scoring point
  PathDistPruned:
    scale: 0.01            # default: 32.0  mir: 32.0   - weighting for how much it should stick to the global path plan
    class: 'mir_dwb_critics::PathDistPruned'
  PathProgress:
    scale: 24.0            # default: 24.0  mir: 48.0   - weighting for how much it should attempt to reach its goal
    heading_scale: 0.01
    class: 'mir_dwb_critics::PathProgress'
    xy_local_goal_tolerance: 0.5
    angle_threshold: 0.523598776  # 30 degrees
    # angle_threshold: 0.785398163 # 45 degrees

  # Prune already passed poses from plan
  prune_plan: true
  prune_distance: 1.0   # Old poses farther away than prune_distance (in m) will be pruned.
                        # If the robot ever gets away further than this distance from the plan,
                        # the error "Resulting plan has 0 poses in it" will be thrown and
                        # replanning will be triggered.

  # Debugging
  publish_cost_grid_pc: true
  debug_trajectory_details: false
  publish_evaluation: true
  publish_global_plan: true
  publish_input_params: true
  publish_local_plan: true
  publish_trajectories: true
  publish_transformed_plan: true
  marker_lifetime: 0.5