Advertisement
Guest User

nav2_params.yaml

a guest
May 4th, 2023
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 11.11 KB | Source Code | 0 0
  1. amcl:
  2.   ros__parameters:
  3.     use_sim_time: True
  4.     alpha1: 0.2
  5.     alpha2: 0.2
  6.     alpha3: 0.2
  7.     alpha4: 0.2
  8.     alpha5: 0.2
  9.     base_frame_id: "base_footprint"
  10.     beam_skip_distance: 0.5
  11.     beam_skip_error_threshold: 0.9
  12.     beam_skip_threshold: 0.3
  13.     do_beamskip: false
  14.     global_frame_id: "map"
  15.     lambda_short: 0.1
  16.     laser_likelihood_max_dist: 2.0
  17.     laser_max_range: 100.0
  18.     laser_min_range: -1.0
  19.     laser_model_type: "likelihood_field"
  20.     max_beams: 60
  21.     max_particles: 2000
  22.     min_particles: 500
  23.     odom_frame_id: "odom"
  24.     pf_err: 0.05
  25.     pf_z: 0.99
  26.     recovery_alpha_fast: 0.0
  27.     recovery_alpha_slow: 0.0
  28.     resample_interval: 1
  29.     robot_model_type: "differential" #Need to customize later an Ackermman plugin for  this according to the documentation: https://navigation.ros.org/configuration/packages/configuring-amcl.html
  30.     save_pose_rate: 0.5
  31.     sigma_hit: 0.2
  32.     tf_broadcast: true
  33.     transform_tolerance: 1.0
  34.     update_min_a: 0.2
  35.     update_min_d: 0.25
  36.     z_hit: 0.5
  37.     z_max: 0.05
  38.     z_rand: 0.5
  39.     z_short: 0.05
  40.     scan_topic: scan
  41.  
  42. amcl_map_client:
  43.   ros__parameters:
  44.     use_sim_time: True
  45.  
  46. amcl_rclcpp_node:
  47.   ros__parameters:
  48.     use_sim_time: True
  49.  
  50. bt_navigator:
  51.   ros__parameters:
  52.     use_sim_time: True
  53.     global_frame: map
  54.     robot_base_frame: base_link
  55.     odom_topic: /odom
  56.     bt_loop_duration: 10
  57.     default_server_timeout: 20
  58.     enable_groot_monitoring: True
  59.     groot_zmq_publisher_port: 1666
  60.     groot_zmq_server_port: 1667
  61.     # 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are use defaults:
  62.     # nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
  63.     # nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
  64.     # They can be set here or via a RewrittenYaml remap from a parent launch file to Nav2.
  65.     plugin_lib_names:
  66.     - nav2_compute_path_to_pose_action_bt_node
  67.     - nav2_compute_path_through_poses_action_bt_node
  68.     - nav2_follow_path_action_bt_node
  69.     - nav2_back_up_action_bt_node
  70.     - nav2_spin_action_bt_node
  71.     - nav2_wait_action_bt_node
  72.     - nav2_clear_costmap_service_bt_node
  73.     - nav2_is_stuck_condition_bt_node
  74.     - nav2_goal_reached_condition_bt_node
  75.     - nav2_goal_updated_condition_bt_node
  76.     - nav2_initial_pose_received_condition_bt_node
  77.     - nav2_reinitialize_global_localization_service_bt_node
  78.     - nav2_rate_controller_bt_node
  79.     - nav2_distance_controller_bt_node
  80.     - nav2_speed_controller_bt_node
  81.     - nav2_truncate_path_action_bt_node
  82.     - nav2_goal_updater_node_bt_node
  83.     - nav2_recovery_node_bt_node
  84.     - nav2_pipeline_sequence_bt_node
  85.     - nav2_round_robin_node_bt_node
  86.     - nav2_transform_available_condition_bt_node
  87.     - nav2_time_expired_condition_bt_node
  88.     - nav2_distance_traveled_condition_bt_node
  89.     - nav2_single_trigger_bt_node
  90.     - nav2_is_battery_low_condition_bt_node
  91.     - nav2_navigate_through_poses_action_bt_node
  92.     - nav2_navigate_to_pose_action_bt_node
  93.     - nav2_remove_passed_goals_action_bt_node
  94.     - nav2_planner_selector_bt_node
  95.     - nav2_controller_selector_bt_node
  96.     - nav2_goal_checker_selector_bt_node
  97.  
  98. bt_navigator_rclcpp_node:
  99.   ros__parameters:
  100.     use_sim_time: True
  101.  
  102. controller_server:
  103.   ros__parameters:
  104.     use_sim_time: True
  105.     controller_frequency: 20.0
  106.     min_x_velocity_threshold: 0.001
  107.     min_y_velocity_threshold: 0.5
  108.     min_theta_velocity_threshold: 0.001
  109.     failure_tolerance: 0.3
  110.     progress_checker_plugin: "progress_checker"
  111.     goal_checker_plugins: ["general_goal_checker"] # "precise_goal_checker"
  112.     controller_plugins: ["FollowPath"]
  113.  
  114.     # Progress checker parameters
  115.     progress_checker:
  116.       plugin: "nav2_controller::SimpleProgressChecker"
  117.       required_movement_radius: 0.5
  118.       movement_time_allowance: 10.0
  119.     # Goal checker parameters
  120.     #precise_goal_checker:
  121.     #  plugin: "nav2_controller::SimpleGoalChecker"
  122.     #  xy_goal_tolerance: 0.25
  123.     #  yaw_goal_tolerance: 0.25
  124.     #  stateful: True
  125.     general_goal_checker:
  126.       stateful: True
  127.       plugin: "nav2_controller::SimpleGoalChecker"
  128.       xy_goal_tolerance: 0.25
  129.       yaw_goal_tolerance: 0.25
  130.     # DWB parameters
  131.     FollowPath:
  132.       plugin: "dwb_core::DWBLocalPlanner"
  133.       debug_trajectory_details: True
  134.       min_vel_x: 0.0
  135.       min_vel_y: 0.0
  136.       max_vel_x: 0.26
  137.       max_vel_y: 0.0
  138.       max_vel_theta: 1.0
  139.       min_speed_xy: 0.0
  140.       max_speed_xy: 0.26
  141.       min_speed_theta: 0.0
  142.       # Add high threshold velocity for turtlebot 3 issue.
  143.       # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75
  144.       acc_lim_x: 2.5
  145.       acc_lim_y: 0.0
  146.       acc_lim_theta: 3.2
  147.       decel_lim_x: -2.5
  148.       decel_lim_y: 0.0
  149.       decel_lim_theta: -3.2
  150.       vx_samples: 20
  151.       vy_samples: 5
  152.       vtheta_samples: 20
  153.       sim_time: 1.7
  154.       linear_granularity: 0.05
  155.       angular_granularity: 0.025
  156.       transform_tolerance: 0.2
  157.       xy_goal_tolerance: 0.25
  158.       trans_stopped_velocity: 0.25
  159.       short_circuit_trajectory_evaluation: True
  160.       stateful: True
  161.       critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]
  162.       BaseObstacle.scale: 0.02
  163.       PathAlign.scale: 32.0
  164.       PathAlign.forward_point_distance: 0.1
  165.       GoalAlign.scale: 24.0
  166.       GoalAlign.forward_point_distance: 0.1
  167.       PathDist.scale: 32.0
  168.       GoalDist.scale: 24.0
  169.       RotateToGoal.scale: 32.0
  170.       RotateToGoal.slowing_factor: 5.0
  171.       RotateToGoal.lookahead_time: -1.0
  172.      
  173. controller_server_rclcpp_node:
  174.   ros__parameters:
  175.     use_sim_time: True
  176.  
  177. local_costmap:
  178.   local_costmap:
  179.     ros__parameters:
  180.       update_frequency: 5.0
  181.       publish_frequency: 2.0
  182.       global_frame: odom
  183.       robot_base_frame: base_link
  184.       static_map: false
  185.       use_sim_time: True
  186.       rolling_window: true
  187.       width: 30
  188.       height: 30
  189.       #origin_x: -5.0
  190.       #origin_y: -5.0
  191.       resolution: 0.05
  192.       footprint: "[ [-4.15, -1.3025], [4.15, -1.3025], [4.15, 1.3025], [-4.15, 1.3025] ]" # Put an offste of 0.1meters each side (corner points)
  193.       #of chassis: Length: 8.2m (total robot length) + 0.1m (margin offset) = 8.3m | Width: 2.505m (total robot width) + 0.1m (margin offset) = 2.605m
  194.       robot_radius: 4.5 # 4.3411 real value but put a margin
  195.       plugins: ["voxel_layer", "inflation_layer"]
  196.       inflation_layer:
  197.         plugin: "nav2_costmap_2d::InflationLayer"
  198.         cost_scaling_factor: 3.0
  199.         inflation_radius: 0.55
  200.       voxel_layer:
  201.         plugin: "nav2_costmap_2d::VoxelLayer"
  202.         enabled: True
  203.         publish_voxel_map: True
  204.         origin_z: 0.0
  205.         z_resolution: 0.05
  206.         z_voxels: 16
  207.         max_obstacle_height: 5.0
  208.         mark_threshold: 0
  209.         observation_sources: scan
  210.         scan:
  211.           topic: /scan
  212.           max_obstacle_height: 2.0
  213.           clearing: True
  214.           marking: True
  215.           data_type: "LaserScan"
  216.           raytrace_max_range: 3.0
  217.           raytrace_min_range: 0.0
  218.           obstacle_max_range: 2.5
  219.           obstacle_min_range: 0.0
  220.       static_layer:
  221.         map_subscribe_transient_local: True
  222.       always_send_full_costmap: True
  223.   local_costmap_client:
  224.     ros__parameters:
  225.       use_sim_time: True
  226.   local_costmap_rclcpp_node:
  227.     ros__parameters:
  228.       use_sim_time: True
  229.  
  230. global_costmap:
  231.   global_costmap:
  232.     ros__parameters:
  233.       update_frequency: 1.0
  234.       publish_frequency: 1.0
  235.       width: 50
  236.       height: 50
  237.       origin_x: -10.0
  238.       origin_y: -10.0
  239.       global_frame: map
  240.       robot_base_frame: base_link
  241.       use_sim_time: True
  242.       footprint: "[ [-4.15, -1.3025], [4.15, -1.3025], [4.15, 1.3025], [-4.15, 1.3025] ]"
  243.       robot_radius: 4.5
  244.       resolution: 0.05
  245.       track_unknown_space: true
  246.       plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
  247.       obstacle_layer:
  248.         plugin: "nav2_costmap_2d::ObstacleLayer"
  249.         enabled: True
  250.         observation_sources: scan
  251.         scan:
  252.           topic: /scan
  253.           max_obstacle_height: 2.0
  254.           clearing: True
  255.           marking: True
  256.           data_type: "LaserScan"
  257.           raytrace_max_range: 3.0
  258.           raytrace_min_range: 0.0
  259.           obstacle_max_range: 2.5
  260.           obstacle_min_range: 0.0
  261.       static_layer:
  262.         plugin: "nav2_costmap_2d::StaticLayer"
  263.         map_subscribe_transient_local: True
  264.       inflation_layer:
  265.         plugin: "nav2_costmap_2d::InflationLayer"
  266.         cost_scaling_factor: 3.0
  267.         inflation_radius: 0.55
  268.       always_send_full_costmap: True
  269.   global_costmap_client:
  270.     ros__parameters:
  271.       use_sim_time: True
  272.   global_costmap_rclcpp_node:
  273.     ros__parameters:
  274.       use_sim_time: True
  275.  
  276. map_server:
  277.   ros__parameters:
  278.     use_sim_time: True
  279.     yaml_filename: "turtlebot3_world.yaml"
  280.  
  281. map_saver:
  282.   ros__parameters:
  283.     use_sim_time: True
  284.     save_map_timeout: 5.0
  285.     free_thresh_default: 0.25
  286.     occupied_thresh_default: 0.65
  287.     map_subscribe_transient_local: True
  288.  
  289. planner_server:
  290.   ros__parameters:
  291.     planner_plugins: ["GridBased"]
  292.     use_sim_time: True
  293.  
  294.     GridBased:
  295.       plugin: "nav2_smac_planner/SmacPlannerHybrid"
  296.       downsample_costmap: false
  297.       downsampling_factor: 1
  298.       tolerance: 0.25
  299.       allow_unknown: true
  300.       max_iterations: 1000000
  301.       max_on_approach_iterations: 1000
  302.       max_planning_time: 5.0
  303.       motion_model_for_search: "DUBIN"
  304.       angle_quantization_bins: 72
  305.       analytic_expansion_ratio: 3.5
  306.       analytic_expansion_max_length: 3.0
  307.       minimum_turning_radius: 0.40
  308.       reverse_penalty: 2.0
  309.       change_penalty: 0.0
  310.       non_straight_penalty: 1.2
  311.       cost_penalty: 2.0
  312.       retrospective_penalty: 0.015
  313.       lookup_table_size: 20.0
  314.       cache_obstacle_heuristic: false
  315.       smooth_path: True
  316.       costmap:
  317.         resolution: 0.5
  318.         width: 150
  319.         height: 150
  320.         footprint: "[ [-4.15, -1.3025], [4.15, -1.3025], [4.15, 1.3025], [-4.15, 1.3025] ]"
  321.  
  322.       smoother:
  323.         max_iterations: 1000
  324.         w_smooth: 0.3
  325.         w_data: 0.2
  326.         tolerance: 1.0e-10
  327.         do_refinement: true
  328.         refinement_num: 2
  329.  
  330.  
  331. planner_server_rclcpp_node:
  332.   ros__parameters:
  333.     use_sim_time: True
  334.  
  335. recoveries_server:
  336.   ros__parameters:
  337.     costmap_topic: local_costmap/costmap_raw
  338.     footprint_topic: local_costmap/published_footprint
  339.     cycle_frequency: 10.0
  340.     recovery_plugins: ["spin", "backup", "wait"]
  341.     spin:
  342.       plugin: "nav2_recoveries/Spin"
  343.     backup:
  344.       plugin: "nav2_recoveries/BackUp"
  345.     wait:
  346.       plugin: "nav2_recoveries/Wait"
  347.     global_frame: odom
  348.     robot_base_frame: base_link
  349.     transform_timeout: 0.1
  350.     use_sim_time: true
  351.     simulate_ahead_time: 2.0
  352.     max_rotational_vel: 1.0
  353.     min_rotational_vel: 0.4
  354.     rotational_acc_lim: 3.2
  355.  
  356. robot_state_publisher:
  357.   ros__parameters:
  358.     use_sim_time: True
  359.  
  360. waypoint_follower:
  361.   ros__parameters:
  362.     loop_rate: 20
  363.     stop_on_failure: false
  364.     waypoint_task_executor_plugin: "wait_at_waypoint"  
  365.     wait_at_waypoint:
  366.       plugin: "nav2_waypoint_follower::WaitAtWaypoint"
  367.       enabled: True
  368.       waypoint_pause_duration: 200
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement