Advertisement
Guest User

nav2_params.yaml

a guest
Sep 19th, 2023
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.78 KB | None | 0 0
  1. bt_navigator:
  2. ros__parameters:
  3. use_sim_time: True
  4. global_frame: map
  5. robot_base_frame: base_link
  6. odom_topic: /odom
  7. bt_loop_duration: 10
  8. default_server_timeout: 20
  9. enable_groot_monitoring: True
  10. groot_zmq_publisher_port: 1666
  11. groot_zmq_server_port: 1667
  12. # 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are use defaults:
  13. # nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
  14. # nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
  15. # They can be set here or via a RewrittenYaml remap from a parent launch file to Nav2.
  16. plugin_lib_names:
  17. - nav2_compute_path_to_pose_action_bt_node
  18. - nav2_compute_path_through_poses_action_bt_node
  19. - nav2_follow_path_action_bt_node
  20. - nav2_back_up_action_bt_node
  21. - nav2_spin_action_bt_node
  22. - nav2_wait_action_bt_node
  23. - nav2_clear_costmap_service_bt_node
  24. - nav2_is_stuck_condition_bt_node
  25. - nav2_goal_reached_condition_bt_node
  26. - nav2_goal_updated_condition_bt_node
  27. - nav2_initial_pose_received_condition_bt_node
  28. - nav2_reinitialize_global_localization_service_bt_node
  29. - nav2_rate_controller_bt_node
  30. - nav2_distance_controller_bt_node
  31. - nav2_speed_controller_bt_node
  32. - nav2_truncate_path_action_bt_node
  33. - nav2_goal_updater_node_bt_node
  34. - nav2_recovery_node_bt_node
  35. - nav2_pipeline_sequence_bt_node
  36. - nav2_round_robin_node_bt_node
  37. - nav2_transform_available_condition_bt_node
  38. - nav2_time_expired_condition_bt_node
  39. - nav2_distance_traveled_condition_bt_node
  40. - nav2_single_trigger_bt_node
  41. - nav2_is_battery_low_condition_bt_node
  42. - nav2_navigate_through_poses_action_bt_node
  43. - nav2_navigate_to_pose_action_bt_node
  44. - nav2_remove_passed_goals_action_bt_node
  45. - nav2_planner_selector_bt_node
  46. - nav2_controller_selector_bt_node
  47. - nav2_goal_checker_selector_bt_node
  48.  
  49. bt_navigator_rclcpp_node:
  50. ros__parameters:
  51. use_sim_time: True
  52.  
  53. controller_server:
  54. ros__parameters:
  55. use_sim_time: True
  56. controller_frequency: 20.0
  57. min_x_velocity_threshold: 0.01 #0.001
  58. min_y_velocity_threshold: 0.5
  59. min_theta_velocity_threshold: 0.01 #0.001
  60. failure_tolerance: 1.0 #0.3
  61. progress_checker_plugin: "progress_checker"
  62. goal_checker_plugins: ["general_goal_checker"] # "precise_goal_checker"
  63. controller_plugins: ["FollowPath"]
  64.  
  65. # Progress checker parameters
  66. progress_checker:
  67. plugin: "nav2_controller::SimpleProgressChecker"
  68. required_movement_radius: 0.5 #1.0 #0.5
  69. movement_time_allowance: 10.0
  70. # Goal checker parameters
  71. # precise_goal_checker:
  72. # plugin: "nav2_controller::SimpleGoalChecker"
  73. # xy_goal_tolerance: 1.0
  74. # yaw_goal_tolerance: 1.0
  75. # stateful: True
  76. general_goal_checker:
  77. stateful: True
  78. plugin: "nav2_controller::SimpleGoalChecker"
  79. xy_goal_tolerance: 3.0 #0.25
  80. yaw_goal_tolerance: 25.0 #0.25
  81. # DWB parameters
  82. FollowPath:
  83. plugin: "dwb_core::DWBLocalPlanner"
  84. debug_trajectory_details: True
  85. min_vel_x: 0.0
  86. min_vel_y: 0.0
  87. max_vel_x: 15.0
  88. max_vel_y: 0.0
  89. max_vel_theta: 10.0
  90. min_speed_xy: 0.0
  91. max_speed_xy: 26.0
  92. min_speed_theta: 0.0
  93. # Add high threshold velocity for turtlebot 3 issue.
  94. # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75
  95. acc_lim_x: 25.0
  96. acc_lim_y: 0.0
  97. acc_lim_theta: 25.0
  98. decel_lim_x: -25.0
  99. decel_lim_y: 0.0
  100. decel_lim_theta: -25.0
  101. vx_samples: 20
  102. vy_samples: 5
  103. vtheta_samples: 20
  104. sim_time: 1.7
  105. linear_granularity: 0.05 #0.05 # Distance between consecutive points in the path. Lower values increase resolution but also computational cost.
  106. angular_granularity: 0.25 #0.025 # Minimum change in orientation between path points. Smaller values lead to smoother turns but higher computational expense
  107. transform_tolerance: 0.2
  108. xy_goal_tolerance: 2.0 #0.25
  109. trans_stopped_velocity: 0.25
  110. short_circuit_trajectory_evaluation: True
  111. stateful: True
  112. critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]
  113. BaseObstacle.scale: 0.02
  114. PathAlign.scale: 32.0
  115. PathAlign.forward_point_distance: 0.1
  116. GoalAlign.scale: 24.0
  117. GoalAlign.forward_point_distance: 0.1
  118. PathDist.scale: 32.0
  119. GoalDist.scale: 24.0
  120. RotateToGoal.scale: 32.0
  121. RotateToGoal.slowing_factor: 5.0
  122. RotateToGoal.lookahead_time: -1.0
  123.  
  124. controller_server_rclcpp_node:
  125. ros__parameters:
  126. use_sim_time: True
  127.  
  128. local_costmap:
  129. local_costmap:
  130. ros__parameters:
  131. #Added below to enable slam
  132. unknown_cost_value: 0
  133. lethal_cost_threshold: 100
  134. update_frequency: 5.0
  135. publish_frequency: 2.0
  136. global_frame: odom
  137. robot_base_frame: base_link
  138. use_sim_time: True
  139. rolling_window: true
  140. width: 50
  141. height: 50
  142. resolution: 0.2
  143. #robot_radius: 0.22
  144. footprint: "[[-4.8025, -1.739], [4.8025, -1.739], [4.8025, 1.739], [-4.8025, 1.739]]"
  145. plugins: ["voxel_layer", "inflation_layer"]
  146. inflation_layer:
  147. plugin: "nav2_costmap_2d::InflationLayer"
  148. cost_scaling_factor: 1.0 #3.0
  149. inflation_radius: 0.5 #2.0 #0.55
  150. voxel_layer:
  151. plugin: "nav2_costmap_2d::VoxelLayer"
  152. enabled: True
  153. publish_voxel_map: True
  154. origin_z: 2.0
  155. z_resolution: 0.2
  156. z_voxels: 32
  157. max_obstacle_height: 2.0 #2.0 # 3.5 m is > 3.041 meters (max truck height)
  158. min_obstacle_height: 0.0 # IGNORING GROUND AS OBSTACLE AND SMALL THING UNDER 0.5 Meters.
  159. mark_threshold: 0
  160. observation_sources: fused_scan #outside_truck_scan #real_kinect_sensor/scan
  161. fused_scan:
  162. topic: /fused_scan #/real_kinect_sensor/scan
  163. max_obstacle_height: 2.0
  164. clearing: True
  165. marking: True
  166. data_type: "LaserScan"
  167. raytrace_max_range: 50.0 # Half of maximum lidar data range
  168. raytrace_min_range: 0.0 #Lidar is detecting the cabin itself as obstacle and populating costmap around the robot set param >0.0
  169. obstacle_max_range: 50.0 # Half of maximum lidar data range
  170. obstacle_min_range: 1.0 # > 0.0 avoid that lidar detect truck as obstacle #Lidar is detecting the cabin itself as obstacle and populating costmap around the robot set param >0.0
  171. static_layer:
  172. map_subscribe_transient_local: True
  173. always_send_full_costmap: True
  174. local_costmap_client:
  175. ros__parameters:
  176. use_sim_time: True
  177. local_costmap_rclcpp_node:
  178. ros__parameters:
  179. use_sim_time: True
  180.  
  181. global_costmap:
  182. global_costmap:
  183. ros__parameters:
  184. unknown_cost_value: 0 # slightly less than 255 to be more explorative
  185. lethal_cost_threshold: 100
  186. #Added above to improve slam exploration
  187. update_frequency: 1.0
  188. publish_frequency: 1.0
  189. global_frame: map
  190. robot_base_frame: base_link
  191. use_sim_time: True
  192. footprint: "[[-4.8025, -1.739], [4.8025, -1.739], [4.8025, 1.739], [-4.8025, 1.739]]"
  193. #robot_radius: 0.22
  194. resolution: 0.2
  195. track_unknown_space: true
  196. plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
  197. obstacle_layer:
  198. plugin: "nav2_costmap_2d::ObstacleLayer"
  199. enabled: True
  200. observation_sources: fused_scan #outside_truck_scan #left_scan real_kinect_sensor/scan
  201. outside_truck_scan:
  202. topic: /fused_scan
  203. max_obstacle_height: 2.0
  204. clearing: True
  205. marking: True
  206. data_type: "LaserScan"
  207. raytrace_max_range: 100.0
  208. raytrace_min_range: 0.0
  209. obstacle_max_range: 25.0
  210. obstacle_min_range: 1.0
  211. # fused_scan:
  212. # topic: /fused_scan
  213. # max_obstacle_height: 2.0
  214. # clearing: True
  215. # marking: True
  216. # data_type: "LaserScan"
  217. # raytrace_max_range: 100.0
  218. # raytrace_min_range: 0.0
  219. # obstacle_max_range: 25.0
  220. # obstacle_min_range: 1.0
  221. static_layer:
  222. plugin: "nav2_costmap_2d::StaticLayer"
  223. map_subscribe_transient_local: True
  224. inflation_layer:
  225. plugin: "nav2_costmap_2d::InflationLayer"
  226. cost_scaling_factor: 1.0 #3.0
  227. inflation_radius: 0.5 #2.0 #0.55
  228. always_send_full_costmap: True
  229. global_costmap_client:
  230. ros__parameters:
  231. use_sim_time: True
  232. global_costmap_rclcpp_node:
  233. ros__parameters:
  234. use_sim_time: True
  235.  
  236. map_server:
  237. ros__parameters:
  238. use_sim_time: True
  239. yaml_filename: "empty_map.yaml"
  240.  
  241. map_saver:
  242. ros__parameters:
  243. use_sim_time: True
  244. save_map_timeout: 5.0
  245. free_thresh_default: 0.25
  246. occupied_thresh_default: 0.65
  247. map_subscribe_transient_local: True
  248.  
  249. planner_server:
  250. ros__parameters:
  251. expected_planner_frequency: 20.0
  252. use_sim_time: True
  253. planner_plugins: ["GridBased"]
  254.  
  255. GridBased:
  256. plugin: "nav2_smac_planner/SmacPlannerHybrid" #"nav2_smac_planner/SmacPlannerLattice"
  257. downsample_costmap: false
  258. downsampling_factor: 1
  259. tolerance: 1.0 #0.5 #0.25 # Adjust based on how much error you can tolerate in the planned path
  260. allow_unknown: true
  261. cost_scaling_factor: 0.9
  262. neutral_cost: 50
  263. max_iterations: 1000000
  264. max_on_approach_iterations: 1000
  265. max_planning_time: 10.0 # If you find planning takes too long, you might want to lower this
  266. motion_model_for_search: "DUBIN" #"REEDS_SHEPP"
  267. angle_quantization_bins: 72
  268. analytic_expansion_ratio: 3.5
  269. analytic_expansion_max_length: 3.0
  270. #The parameter below creates a curve shape of the end of planner forcing a curved
  271. minimum_turning_radius: 0.00001 # Adjust based on your robot's actual turning radius
  272. reverse_penalty: 2.0
  273. change_penalty: 0.0
  274. non_straight_penalty: 1.2
  275. cost_penalty: 2.0
  276. retrospective_penalty: 0.015
  277. lookup_table_size: 20.0
  278. cache_obstacle_heuristic: false
  279. smooth_path: True # If your robot can handle sharp turns, you might not need path smoothing
  280. costmap:
  281. resolution: 0.75 #0.2
  282. #width: 25 #150
  283. #height: 25 #150
  284. #radius: 0.22
  285. footprint: "[[-4.8025, -1.739], [4.8025, -1.739], [4.8025, 1.739], [-4.8025, 1.739]]"
  286.  
  287.  
  288. smoother:
  289. max_iterations: 2000 #1000
  290. w_smooth: 1.0 #0.5 # 0.3 # Adjust based on how much smoothing you want (higher value means more smoothing)
  291. w_data: 1.0 #0.5 #0.2 # Adjust based on how closely you want the smoothed path to adhere to the original path
  292. tolerance: 1.0e-10
  293. do_refinement: true
  294. refinement_num: 10 #2
  295.  
  296. planner_server_rclcpp_node:
  297. ros__parameters:
  298. use_sim_time: True
  299.  
  300. recoveries_server:
  301. ros__parameters:
  302. costmap_topic: local_costmap/costmap_raw
  303. footprint_topic: local_costmap/published_footprint
  304. cycle_frequency: 10.0
  305. recovery_plugins: ["spin", "backup", "wait"]
  306. spin:
  307. plugin: "nav2_recoveries/Spin"
  308. backup:
  309. plugin: "nav2_recoveries/BackUp"
  310. wait:
  311. plugin: "nav2_recoveries/Wait"
  312. global_frame: odom
  313. robot_base_frame: base_link
  314. transform_timeout: 0.1
  315. use_sim_time: true
  316. simulate_ahead_time: 2.0
  317. max_rotational_vel: 1.0
  318. min_rotational_vel: 0.4
  319. rotational_acc_lim: 3.2
  320.  
  321. robot_state_publisher:
  322. ros__parameters:
  323. use_sim_time: True
  324.  
  325. waypoint_follower:
  326. ros__parameters:
  327. loop_rate: 20
  328. stop_on_failure: false
  329. waypoint_task_executor_plugin: "wait_at_waypoint"
  330. wait_at_waypoint:
  331. plugin: "nav2_waypoint_follower::WaitAtWaypoint"
  332. enabled: True
  333. waypoint_pause_duration: 200
  334.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement