Advertisement
Guest User

truck_nav2_params.yaml

a guest
Jul 30th, 2023
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.86 KB | None | 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: 10000 #2000
  22. min_particles: 2000 #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: "omnidirectional" #differential
  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: kinect_sensor/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.01 #0.001
  107. min_y_velocity_threshold: 0.5
  108. min_theta_velocity_threshold: 0.01 #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 #1.0 #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 #15.0 #0.0
  135. min_vel_y: 0.0
  136. max_vel_x: 30.0 #0.26 #5.0 #0.26
  137. max_vel_y: 0.0
  138. max_vel_theta: 10.0 #1.0
  139. min_speed_xy: 0.0 #10.0 #0.0
  140. max_speed_xy: 26.0 #0.26 #5.0 #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: 25.0 #2.5
  145. acc_lim_y: 0.0
  146. acc_lim_theta: 25.0 #3.2
  147. decel_lim_x: -25.0 #-2.5
  148. decel_lim_y: 0.0
  149. decel_lim_theta: -25.0 #-3.2
  150. vx_samples: 20
  151. vy_samples: 5
  152. vtheta_samples: 20
  153. sim_time: 1.7
  154. linear_granularity: 0.05 #0.05 # Distance between consecutive points in the path. Lower values increase resolution but also computational cost.
  155. angular_granularity: 0.025 #0.025 # Minimum change in orientation between path points. Smaller values lead to smoother turns but higher computational expense
  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. use_sim_time: True
  185. rolling_window: true
  186. width: 50
  187. height: 50
  188. resolution: 0.05
  189. #robot_radius: 0.22
  190. footprint: "[[-4.8025, -1.274], [4.8025, -1.274], [4.8025, 1.274], [-4.8025, 1.274]]"
  191. plugins: ["voxel_layer", "inflation_layer"]
  192. inflation_layer:
  193. plugin: "nav2_costmap_2d::InflationLayer"
  194. cost_scaling_factor: 3.0
  195. inflation_radius: 2.0 #0.55
  196. voxel_layer:
  197. plugin: "nav2_costmap_2d::VoxelLayer"
  198. enabled: True
  199. publish_voxel_map: True
  200. origin_z: 2.0
  201. z_resolution: 0.5
  202. z_voxels: 16
  203. max_obstacle_height: 2.0 #2.0 # 3.5 m is > 3.041 meters (max truck height)
  204. min_obstacle_height: 0.0 # IGNORING GROUND AS OBSTACLE AND SMALL THING UNDER 0.5 Meters.
  205. mark_threshold: 0
  206. observation_sources: real_kinect_sensor/scan
  207. real_kinect_sensor/scan:
  208. topic: /real_kinect_sensor/scan
  209. max_obstacle_height: 2.0
  210. clearing: True
  211. marking: True
  212. data_type: "LaserScan"
  213. raytrace_max_range: 15.0 # Half of maximum lidar data range
  214. raytrace_min_range: 0.0
  215. obstacle_max_range: 15.0 # Half of maximum lidar data range
  216. obstacle_min_range: 0.0
  217. # fused_scan:
  218. # topic: /fused_scan
  219. # max_obstacle_height: 2.0
  220. # clearing: True
  221. # marking: True
  222. # data_type: "LaserScan"
  223. # raytrace_max_range: 50.0 # Half of maximum lidar data range
  224. # raytrace_min_range: 0.0
  225. # obstacle_max_range: 50.0 # Half of maximum lidar data range
  226. # obstacle_min_range: 0.0
  227. static_layer:
  228. map_subscribe_transient_local: True
  229. always_send_full_costmap: True
  230. local_costmap_client:
  231. ros__parameters:
  232. use_sim_time: True
  233. local_costmap_rclcpp_node:
  234. ros__parameters:
  235. use_sim_time: True
  236.  
  237. global_costmap:
  238. global_costmap:
  239. ros__parameters:
  240. update_frequency: 1.0
  241. publish_frequency: 1.0
  242. global_frame: map
  243. robot_base_frame: base_link
  244. use_sim_time: True
  245. footprint: "[[-4.8025, -1.274], [4.8025, -1.274], [4.8025, 1.274], [-4.8025, 1.274]]"
  246. #robot_radius: 0.22
  247. resolution: 0.05
  248. track_unknown_space: true
  249. plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
  250. obstacle_layer:
  251. plugin: "nav2_costmap_2d::ObstacleLayer"
  252. enabled: True
  253. observation_sources: real_kinect_sensor/scan fused_scan left_scan
  254. left_scan:
  255. topic: /left_scan
  256. max_obstacle_height: 2.0
  257. clearing: True
  258. marking: True
  259. data_type: "LaserScan"
  260. raytrace_max_range: 100.0
  261. raytrace_min_range: 0.0
  262. obstacle_max_range: 25.0
  263. obstacle_min_range: 0.0
  264. real_kinect_sensor/scan:
  265. topic: /real_kinect_sensor/scan
  266. max_obstacle_height: 2.0
  267. clearing: True
  268. marking: True
  269. data_type: "LaserScan"
  270. raytrace_max_range: 15.0
  271. raytrace_min_range: 0.0
  272. obstacle_max_range: 15.0
  273. obstacle_min_range: 0.0
  274. fused_scan:
  275. topic: /fused_scan
  276. max_obstacle_height: 2.0
  277. clearing: True
  278. marking: True
  279. data_type: "LaserScan"
  280. raytrace_max_range: 100.0
  281. raytrace_min_range: 0.0
  282. obstacle_max_range: 25.0
  283. obstacle_min_range: 0.0
  284. static_layer:
  285. plugin: "nav2_costmap_2d::StaticLayer"
  286. map_subscribe_transient_local: True
  287. inflation_layer:
  288. plugin: "nav2_costmap_2d::InflationLayer"
  289. cost_scaling_factor: 3.0
  290. inflation_radius: 2.0 #0.55
  291. always_send_full_costmap: True
  292. global_costmap_client:
  293. ros__parameters:
  294. use_sim_time: True
  295. global_costmap_rclcpp_node:
  296. ros__parameters:
  297. use_sim_time: True
  298.  
  299. map_server:
  300. ros__parameters:
  301. use_sim_time: True
  302. yaml_filename: "fixed_map.yaml"
  303.  
  304. map_saver:
  305. ros__parameters:
  306. use_sim_time: True
  307. save_map_timeout: 5.0
  308. free_thresh_default: 0.25
  309. occupied_thresh_default: 0.65
  310. map_subscribe_transient_local: True
  311.  
  312. planner_server:
  313. ros__parameters:
  314. expected_planner_frequency: 20.0
  315. use_sim_time: True
  316. planner_plugins: ["GridBased"]
  317.  
  318. GridBased:
  319. plugin: "nav2_smac_planner/SmacPlannerHybrid"
  320. downsample_costmap: false
  321. downsampling_factor: 1
  322. tolerance: 0.5 #0.25 # Adjust based on how much error you can tolerate in the planned path
  323. allow_unknown: true
  324. max_iterations: 1000000
  325. max_on_approach_iterations: 1000
  326. max_planning_time: 10.0 # If you find planning takes too long, you might want to lower this
  327. motion_model_for_search: "DUBIN"
  328. angle_quantization_bins: 72
  329. analytic_expansion_ratio: 3.5
  330. analytic_expansion_max_length: 3.0
  331. minimum_turning_radius: 1.0 # Adjust based on your robot's actual turning radius
  332. reverse_penalty: 2.0
  333. change_penalty: 0.0
  334. non_straight_penalty: 1.2
  335. cost_penalty: 2.0
  336. retrospective_penalty: 0.015
  337. lookup_table_size: 20.0
  338. cache_obstacle_heuristic: false
  339. smooth_path: True # If your robot can handle sharp turns, you might not need path smoothing
  340. costmap:
  341. resolution: 0.5
  342. #width: 25 #150
  343. #height: 25 #150
  344. #radius: 0.22
  345. footprint: "[[-4.8025, -1.274], [4.8025, -1.274], [4.8025, 1.274], [-4.8025, 1.274]]"
  346.  
  347.  
  348. smoother:
  349. max_iterations: 2000 #1000
  350. w_smooth: 1.0 #0.5 # 0.3 # Adjust based on how much smoothing you want (higher value means more smoothing)
  351. w_data: 1.0 #0.5 #0.2 # Adjust based on how closely you want the smoothed path to adhere to the original path
  352. tolerance: 1.0e-10
  353. do_refinement: true
  354. refinement_num: 10 #2
  355.  
  356. planner_server_rclcpp_node:
  357. ros__parameters:
  358. use_sim_time: True
  359.  
  360. recoveries_server:
  361. ros__parameters:
  362. costmap_topic: local_costmap/costmap_raw
  363. footprint_topic: local_costmap/published_footprint
  364. cycle_frequency: 10.0
  365. recovery_plugins: ["spin", "backup", "wait"]
  366. spin:
  367. plugin: "nav2_recoveries/Spin"
  368. backup:
  369. plugin: "nav2_recoveries/BackUp"
  370. wait:
  371. plugin: "nav2_recoveries/Wait"
  372. global_frame: odom
  373. robot_base_frame: base_link
  374. transform_timeout: 0.1
  375. use_sim_time: true
  376. simulate_ahead_time: 2.0
  377. max_rotational_vel: 1.0
  378. min_rotational_vel: 0.4
  379. rotational_acc_lim: 3.2
  380.  
  381. robot_state_publisher:
  382. ros__parameters:
  383. use_sim_time: True
  384.  
  385. waypoint_follower:
  386. ros__parameters:
  387. loop_rate: 20
  388. stop_on_failure: false
  389. waypoint_task_executor_plugin: "wait_at_waypoint"
  390. wait_at_waypoint:
  391. plugin: "nav2_waypoint_follower::WaitAtWaypoint"
  392. enabled: True
  393. waypoint_pause_duration: 200
  394.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement