參考資料 : [ROS 2 導覽調整指南 – Nav2](https://automaticaddison.com/ros-2-navigation-tuning-guide-nav2/) ## AMCL - alpha1~5: 0.01 `使amcl更信賴odom的資訊` - laser_model_type: "likelihood_field_prob" `比較精準` - max_particles: 2000 → 2500 `更多粒子數` - min_particles: 500 → 1000 `更多粒子數` - update_min_a: 0.2 → 0.05 `更新位姿(弧度)` - update_min_d: 0.25 → 0.05 `更新位姿(米)` - scan_topic: scan_hokuyo `topic 來源` ## controller_server: MPPI - controller_frequency: 20.0 → 10.0 `電腦控制頻率跟不上` - xy_goal_tolerance: 0.1 `剛好的裕度,著重於讓控制器再追準一點` - yaw_goal_tolerance: 0.1 `剛好的裕度,著重於讓控制器再追準一點` - model_dt: 0.05 → 0.1 `隨著控制頻率調整,相乘為1` - ax_max: 3.0 `這裡有點怪,測試下來發現 cmd_vel 受限於這裡的速度,而不是 vx_max` - ax_min: -1.8 - ay_max: 0.0 - ay_min: 0.0 - az_max: 3.5 - vx_std: 0.2 - vy_std: 0.0 - wz_std: 0.6 - vx_max: 0.5 - vx_min: -0.25 - vy_max: 0.0 - wz_max: 2.0 - AckermannConstraints.min_turning_r: 0.0 `非阿卡曼輪,不必考慮輪距` - GoalCritic.cost_weight: 30 `更去靠近目標點` - GoalAngleCritic.cost_weight: 10 `更去靠近目標點` - PathAlignCritic.cost_weight: 10.0 `差異不大,可調可不調` - PathAngleCritic.cost_weight: 2.2 `差異不大,可調可不調` ## local_costmap - update_frequency: 15.0 `更新速度快一些` - publish_frequency: 15.0 - width: 5 `包覆走廊` - height: 5 - footprint: "[ [-0.41, -0.31], [-0.41, 0.31], [0.41, 0.31], [0.41, -0.31] ]" `車體大小` - inflation_layer.cost_scaling_factor: 2.58 `文獻,走的會是直線` - inflation_layer.inflation_radius: 1.75 - voxel_layer.raytrace_max_range: 5.0 `掃遠一點,清除殘留` - voxel_layer.obstacle_max_range: 2.5 ## global_costmap - update_frequency: 15.0 `更新速度快一些` - publish_frequency: 15.0 - footprint:"[ [-0.41, -0.31], [-0.41, 0.31], [0.41, 0.31], [0.41, -0.31] ]" - inflation_layer.cost_scaling_factor: 2.58 - inflation_layer.inflation_radius: 1.75 - voxel_layer.raytrace_max_range: 5.0 - voxel_layer.obstacle_max_range: 2.5 ## planner_server - lugin: "nav2_theta_star_planner::ThetaStarPlanner" `比較平滑的路徑` - how_many_corners: 8 `預設參數` - w_euc_cost: 1.0 - w_traversal_cost: 2.0 - w_heuristic_cost: 1.0 ## velocity_smoother: 根據所使用的來調整 - max_velocity: [0.5, 0.0, 3.0] ` x, y, z` - min_velocity: [-0.35, 0.0, -3.0] ` x, y, z` - max_accel: [3.0, 0.0, 5.2] - max_decel: [-1.8, 0.0, -5.2] ## collision_monitor - topic: "scan_hokuyo" `topic`