
position_planner_name: PNKXLocalPlanner
docking_planner_name: PNKXDockingLocalPlanner
go_straight_planner_name: PNKXGoStraightLocalPlanner
rotate_planner_name: PNKXRotateLocalPlanner

base_local_planner: nav_core_adapter::LocalPlannerAdapter
yaw_goal_tolerance: 0.017  
xy_goal_tolerance: 0.015 
stateful: true
publish_topic: true  

LocalPlannerAdapter:
  PNKXLocalPlanner:
    # Algorithm
    trajectory_generator_name: mkt_plugins::LimitedAccelGenerator 
    algorithm_nav_name: mkt_algorithm::diff::PredictiveTrajectory
    algorithm_rotate_name: mkt_algorithm::diff::RotateToGoal
    # Goal checking
    goal_checker_name: mkt_plugins::GoalChecker 

  PNKXDockingLocalPlanner: 
    # Algorithm
    trajectory_generator_name: mkt_plugins::LimitedAccelGenerator 
    algorithm_nav_name: mkt_algorithm::diff::PredictiveTrajectory
    algorithm_rotate_name: mkt_algorithm::diff::RotateToGoal
    # Goal checking
    goal_checker_name: mkt_plugins::GoalChecker 

  PNKXGoStraightLocalPlanner:
    # Algorithm
    trajectory_generator_name: mkt_plugins::LimitedAccelGenerator 
    algorithm_nav_name: mkt_algorithm::diff::GoStraight
    # Goal checking
    goal_checker_name: mkt_plugins::GoalChecker 

  PNKXRotateLocalPlanner:
    # Algorithm
    algorithm_rotate_name: mkt_algorithm::diff::RotateToGoal
    trajectory_generator_name: mkt_plugins::LimitedAccelGenerator 
    # Goal checking
    goal_checker_name: mkt_plugins::SimpleGoalChecker
    stateful: true
    
LimitedAccelGenerator:
  max_vel_x: 1.2
  min_vel_x: -1.2

  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: 0.3    # max_rot_vel: 1.0  # choose slightly less than the base's capability
  min_vel_theta: 0.05  # min_rot_vel: 0.1 default: 0.4  # this is the min angular velocity when there is negligible translational velocity

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

  # Whether to split the path into segments or not
  split_path: true
  sim_time: 1.5
  vx_samples: 15
  vy_samples: 1       
  vtheta_samples: 10
  discretize_by_time: true
  angular_granularity: 0.05
  linear_granularity: 0.1
  # sim_period
  include_last_point: true

PredictiveTrajectory:
  avoid_obstacles: false
  xy_local_goal_tolerance: 0.01
  angle_threshold: 0.5
  index_samples: 60
  follow_step_path: true

  # Lookahead
  use_velocity_scaled_lookahead_dist: true    # Whether to use the velocity scaled lookahead distances or constant lookahead_distance. (default: false)
  # only when false:
  lookahead_dist: 0.325                       # The lookahead distance (m) to use to find the lookahead point. (default: 0.6)
  # only when true:
  min_lookahead_dist: 0.5                     # The minimum lookahead distance (m) threshold. (default: 0.3)
  max_lookahead_dist: 1.5                     # The maximum lookahead distance (m) threshold. (default: 0.9)   
  lookahead_time: 1.8                         # The time (s) to project the velocity by, a.k.a. lookahead gain. (default: 1.5)
  min_journey_squared: 0.3                    # Minimum squared journey to consider for goal (default: 0.2) 
  max_journey_squared: 0.8                    # Maximum squared journey to consider for goal (default: 0.2) 

  # Rotate to heading param - onle one of use_rotate_to_heading and allow_reversing can be set to true
  use_rotate_to_heading: true         # Whether to enable rotating to rough heading and goal orientation when using holonomic planners. Recommended on for all robot types that can rotate in place. (default: true)
  # only when true:
  rotate_to_heading_min_angle: 0.03   # The difference in the path orientation and the starting robot orientation (radians) to trigger a rotate in place. (default: 0.785)

  # stoped
  rot_stopped_velocity: 0.03
  trans_stopped_velocity: 0.06
  min_approach_linear_velocity: 0.05   # The minimum velocity (m/s) threshold to apply when approaching the goal to ensure progress. Must be > 0.01. (default: 0.05)
  
  # Regulated linear velocity scaling
  use_regulated_linear_velocity_scaling: true   # Whether to use the regulated features for path curvature (e.g. slow on high curvature paths). (default: true)
  # only when true:
  regulated_linear_scaling_min_radius: 0.6      # The turning radius (m) for which the regulation features are triggered. Remember, sharper turns have smaller radii. (default: 0.9)
  regulated_linear_scaling_min_speed: 0.05      # The minimum speed (m/s) for which any of the regulated heuristics can send, to ensure process is still achievable even in high cost spaces with high curvature. Must be > 0.1. (default: 0.25)

  # Inflation cost scaling (Limit velocity by proximity to obstacles)
  use_cost_regulated_linear_velocity_scaling: false   # Whether to use the regulated features for proximity to obstacles (e.g. slow in close proximity to obstacles). (default: true)
  inflation_cost_scaling_factor: 2.0                 # (default: 3.0)   # must be > 0
  cost_scaling_dist: 0.2                             # (default: 0.6)
  cost_scaling_gain: 2.0                             # (default: 1.0)

GoStraight:
  avoid_obstacles: false
  xy_local_goal_tolerance: 0.01
  angle_threshold: 0.6
  index_samples: 60
  follow_step_path: true

  # Lookahead
  use_velocity_scaled_lookahead_dist: true   # Whether to use the velocity scaled lookahead distances or constant lookahead_distance. (default: false)
  # only when false:
  lookahead_dist: 0.325                        # The lookahead distance (m) to use to find the lookahead point. (default: 0.6)
  # only when true:
  min_lookahead_dist: 0.5                    # The minimum lookahead distance (m) threshold. (default: 0.3)
  max_lookahead_dist: 1.5                     # The maximum lookahead distance (m) threshold. (default: 0.9)   
  lookahead_time: 1.8                         # The time (s) to project the velocity by, a.k.a. lookahead gain. (default: 1.5)
  min_journey_squared: 0.3                    # Minimum squared journey to consider for goal (default: 0.2) 
  max_journey_squared: 0.6                    # Minimum squared journey to consider for goal (default: 0.2) 

  # Rotate to heading param - onle one of use_rotate_to_heading and allow_reversing can be set to true
  use_rotate_to_heading: true         # Whether to enable rotating to rough heading and goal orientation when using holonomic planners. Recommended on for all robot types that can rotate in place. (default: true)
  # only when true:
  rotate_to_heading_min_angle: 0.35   # The difference in the path orientation and the starting robot orientation (radians) to trigger a rotate in place. (default: 0.785)
  # Speed
  min_approach_linear_velocity: 0.05   # The minimum velocity (m/s) threshold to apply when approaching the goal to ensure progress. Must be > 0.01. (default: 0.05)
  
  # stoped
  rot_stopped_velocity: 0.03
  trans_stopped_velocity: 0.06
  min_approach_linear_velocity: 0.05   # The minimum velocity (m/s) threshold to apply when approaching the goal to ensure progress. Must be > 0.01. (default: 0.05)
  
  use_regulated_linear_velocity_scaling: false
  use_cost_regulated_linear_velocity_scaling: false

RotateToGoal:
  avoid_obstacles: false
  xy_local_goal_tolerance: 0.01
  angle_threshold: 0.6
  index_samples: 60
  follow_step_path: true

  # Lookahead
  use_velocity_scaled_lookahead_dist: true    # Whether to use the velocity scaled lookahead distances or constant lookahead_distance. (default: false)
  # only when false:
  lookahead_dist: 0.325                       # The lookahead distance (m) to use to find the lookahead point. (default: 0.6)
  # only when true:
  min_lookahead_dist: 0.5                     # The minimum lookahead distance (m) threshold. (default: 0.3)
  max_lookahead_dist: 1.5                     # The maximum lookahead distance (m) threshold. (default: 0.9)   
  lookahead_time: 1.8                         # The time (s) to project the velocity by, a.k.a. lookahead gain. (default: 1.5)
  min_journey_squared: 0.3                    # Minimum squared journey to consider for goal (default: 0.2) 
  max_journey_squared: 0.6                    # Maximum squared journey to consider for goal (default: 0.2) 

  # Rotate to heading param - onle one of use_rotate_to_heading and allow_reversing can be set to true
  use_rotate_to_heading: true         # Whether to enable rotating to rough heading and goal orientation when using holonomic planners. Recommended on for all robot types that can rotate in place. (default: true)
  # only when true:
  rotate_to_heading_min_angle: 0.03   # The difference in the path orientation and the starting robot orientation (radians) to trigger a rotate in place. (default: 0.785)

  # stoped
  rot_stopped_velocity: 0.03
  trans_stopped_velocity: 0.06
  min_approach_linear_velocity: 0.05   # The minimum velocity (m/s) threshold to apply when approaching the goal to ensure progress. Must be > 0.01. (default: 0.05)
  
  # Regulated linear velocity scaling
  use_regulated_linear_velocity_scaling: true   # Whether to use the regulated features for path curvature (e.g. slow on high curvature paths). (default: true)
  # only when true:
  regulated_linear_scaling_min_radius: 0.6      # The turning radius (m) for which the regulation features are triggered. Remember, sharper turns have smaller radii. (default: 0.9)
  regulated_linear_scaling_min_speed: 0.05      # The minimum speed (m/s) for which any of the regulated heuristics can send, to ensure process is still achievable even in high cost spaces with high curvature. Must be > 0.1. (default: 0.25)

  # Inflation cost scaling (Limit velocity by proximity to obstacles)
  use_cost_regulated_linear_velocity_scaling: false   # Whether to use the regulated features for proximity to obstacles (e.g. slow in close proximity to obstacles). (default: true)
  inflation_cost_scaling_factor: 2.0                 # (default: 3.0)   # must be > 0
  cost_scaling_dist: 0.2                             # (default: 0.6)
  cost_scaling_gain: 2.0                             # (default: 1.0)