Merge pull request #2 from elephantrobotics/humble-imu

perf(nav2_params): Optimize nav2 navigation parameters
This commit is contained in:
X-lanni
2025-09-30 17:54:26 +08:00
committed by GitHub
4 changed files with 72 additions and 45 deletions
+44 -17
View File
@@ -109,11 +109,11 @@ bt_navigator_rclcpp_node:
controller_server: controller_server:
ros__parameters: ros__parameters:
use_sim_time: False use_sim_time: False
controller_frequency: 5.0 controller_frequency: 20.0
min_x_velocity_threshold: 0.001 min_x_velocity_threshold: 0.001
min_y_velocity_threshold: 0.5 min_y_velocity_threshold: 0.5
min_theta_velocity_threshold: 0.001 min_theta_velocity_threshold: 0.001
failure_tolerance: 3.0 failure_tolerance: 0.3
progress_checker_plugin: "progress_checker" progress_checker_plugin: "progress_checker"
goal_checker_plugins: ["general_goal_checker"] # "precise_goal_checker" goal_checker_plugins: ["general_goal_checker"] # "precise_goal_checker"
controller_plugins: ["FollowPath"] controller_plugins: ["FollowPath"]
@@ -121,8 +121,8 @@ controller_server:
# Progress checker parameters # Progress checker parameters
progress_checker: progress_checker:
plugin: "nav2_controller::SimpleProgressChecker" plugin: "nav2_controller::SimpleProgressChecker"
required_movement_radius: 0.5 required_movement_radius: 0.15
movement_time_allowance: 10.0 movement_time_allowance: 8.0
# Goal checker parameters # Goal checker parameters
#precise_goal_checker: #precise_goal_checker:
# plugin: "nav2_controller::SimpleGoalChecker" # plugin: "nav2_controller::SimpleGoalChecker"
@@ -150,13 +150,13 @@ controller_server:
# https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75 # https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75
acc_lim_x: 2.5 acc_lim_x: 2.5
acc_lim_y: 0.0 acc_lim_y: 0.0
acc_lim_theta: 0.25 acc_lim_theta: 3.2
decel_lim_x: -2.5 decel_lim_x: -2.5
decel_lim_y: 0.0 decel_lim_y: 0.0
decel_lim_theta: -0.25 decel_lim_theta: -3.2
vx_samples: 20 vx_samples: 20
vy_samples: 5 vy_samples: 5
vtheta_samples: 20 vtheta_samples: 40
sim_time: 1.7 sim_time: 1.7
linear_granularity: 0.05 linear_granularity: 0.05
angular_granularity: 0.025 angular_granularity: 0.025
@@ -167,9 +167,9 @@ controller_server:
stateful: True stateful: True
critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"] critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]
BaseObstacle.scale: 0.02 BaseObstacle.scale: 0.02
PathAlign.scale: 32.0 PathAlign.scale: 23.0
PathAlign.forward_point_distance: 0.1 PathAlign.forward_point_distance: 0.1
GoalAlign.scale: 24.0 GoalAlign.scale: 18.0
GoalAlign.forward_point_distance: 0.1 GoalAlign.forward_point_distance: 0.1
PathDist.scale: 32.0 PathDist.scale: 32.0
GoalDist.scale: 24.0 GoalDist.scale: 24.0
@@ -197,8 +197,8 @@ local_costmap:
plugins: ["voxel_layer", "inflation_layer"] plugins: ["voxel_layer", "inflation_layer"]
inflation_layer: inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer" plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 5.0 cost_scaling_factor: 4.0
inflation_radius: 0.25 inflation_radius: 0.30
voxel_layer: voxel_layer:
plugin: "nav2_costmap_2d::VoxelLayer" plugin: "nav2_costmap_2d::VoxelLayer"
enabled: True enabled: True
@@ -232,12 +232,12 @@ local_costmap:
global_costmap: global_costmap:
global_costmap: global_costmap:
ros__parameters: ros__parameters:
update_frequency: 0.3 update_frequency: 1.0
publish_frequency: 0.3 publish_frequency: 1.0
global_frame: map global_frame: map
robot_base_frame: base_footprint robot_base_frame: base_footprint
use_sim_time: False use_sim_time: False
robot_radius: 0.22 footprint: "[[0.26, 0.18], [0.26, -0.18], [-0.26, -0.18], [-0.26, 0.18]]"
resolution: 0.05 resolution: 0.05
track_unknown_space: true track_unknown_space: true
plugins: ["static_layer", "obstacle_layer", "inflation_layer"] plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
@@ -260,8 +260,8 @@ global_costmap:
map_subscribe_transient_local: True map_subscribe_transient_local: True
inflation_layer: inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer" plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 5.0 cost_scaling_factor: 4.0
inflation_radius: 0.25 inflation_radius: 0.30
always_send_full_costmap: True always_send_full_costmap: True
global_costmap_client: global_costmap_client:
ros__parameters: ros__parameters:
@@ -273,7 +273,9 @@ global_costmap:
map_server: map_server:
ros__parameters: ros__parameters:
use_sim_time: False use_sim_time: False
yaml_filename: "turtlebot3_world.yaml" # Overridden in launch by the "map" launch configuration or provided default value.
# To use in yaml, remove the default "map" value in the navigation2_active.launch.py file & provide full path to map below.
yaml_filename: ""
map_saver: map_saver:
ros__parameters: ros__parameters:
@@ -298,6 +300,16 @@ planner_server_rclcpp_node:
ros__parameters: ros__parameters:
use_sim_time: False use_sim_time: False
smoother_server:
ros__parameters:
use_sim_time: True
smoother_plugins: ["simple_smoother"]
simple_smoother:
plugin: "nav2_smoother::SimpleSmoother"
tolerance: 1.0e-10
max_its: 1000
do_refinement: True
recoveries_server: recoveries_server:
ros__parameters: ros__parameters:
costmap_topic: local_costmap/costmap_raw costmap_topic: local_costmap/costmap_raw
@@ -332,3 +344,18 @@ waypoint_follower:
plugin: "nav2_waypoint_follower::WaitAtWaypoint" plugin: "nav2_waypoint_follower::WaitAtWaypoint"
enabled: True enabled: True
waypoint_pause_duration: 200 waypoint_pause_duration: 200
velocity_smoother:
ros__parameters:
use_sim_time: True
smoothing_frequency: 20.0
scale_velocities: False
feedback: "OPEN_LOOP"
max_velocity: [0.26, 0.0, 0.5]
min_velocity: [-0.26, 0.0, -0.5]
max_accel: [2.5, 0.0, 3.2]
max_decel: [-2.5, 0.0, -3.2]
odom_topic: "odom"
odom_duration: 0.1
deadband_velocity: [0.0, 0.0, 0.0]
velocity_timeout: 1.0
@@ -84,8 +84,8 @@ controller_server:
# Progress checker parameters # Progress checker parameters
progress_checker: progress_checker:
plugin: "nav2_controller::SimpleProgressChecker" plugin: "nav2_controller::SimpleProgressChecker"
required_movement_radius: 0.5 required_movement_radius: 0.15
movement_time_allowance: 10.0 movement_time_allowance: 8.0
# Goal checker parameters # Goal checker parameters
#precise_goal_checker: #precise_goal_checker:
# plugin: "nav2_controller::SimpleGoalChecker" # plugin: "nav2_controller::SimpleGoalChecker"
@@ -105,7 +105,7 @@ controller_server:
min_vel_y: 0.0 min_vel_y: 0.0
max_vel_x: 0.26 max_vel_x: 0.26
max_vel_y: 0.0 max_vel_y: 0.0
max_vel_theta: 1.0 max_vel_theta: 0.5
min_speed_xy: 0.0 min_speed_xy: 0.0
max_speed_xy: 0.26 max_speed_xy: 0.26
min_speed_theta: 0.0 min_speed_theta: 0.0
@@ -119,7 +119,7 @@ controller_server:
decel_lim_theta: -3.2 decel_lim_theta: -3.2
vx_samples: 20 vx_samples: 20
vy_samples: 5 vy_samples: 5
vtheta_samples: 20 vtheta_samples: 40
sim_time: 1.7 sim_time: 1.7
linear_granularity: 0.05 linear_granularity: 0.05
angular_granularity: 0.025 angular_granularity: 0.025
@@ -130,9 +130,9 @@ controller_server:
stateful: True stateful: True
critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"] critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]
BaseObstacle.scale: 0.02 BaseObstacle.scale: 0.02
PathAlign.scale: 32.0 PathAlign.scale: 23.0
PathAlign.forward_point_distance: 0.1 PathAlign.forward_point_distance: 0.1
GoalAlign.scale: 24.0 GoalAlign.scale: 18.0
GoalAlign.forward_point_distance: 0.1 GoalAlign.forward_point_distance: 0.1
PathDist.scale: 32.0 PathDist.scale: 32.0
GoalDist.scale: 24.0 GoalDist.scale: 24.0
@@ -156,8 +156,8 @@ local_costmap:
plugins: ["voxel_layer", "inflation_layer"] plugins: ["voxel_layer", "inflation_layer"]
inflation_layer: inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer" plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0 cost_scaling_factor: 4.0
inflation_radius: 0.55 inflation_radius: 0.30
voxel_layer: voxel_layer:
plugin: "nav2_costmap_2d::VoxelLayer" plugin: "nav2_costmap_2d::VoxelLayer"
enabled: True enabled: True
@@ -220,8 +220,8 @@ global_costmap:
map_subscribe_transient_local: True map_subscribe_transient_local: True
inflation_layer: inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer" plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0 cost_scaling_factor: 4.0
inflation_radius: 0.55 inflation_radius: 0.30
always_send_full_costmap: True always_send_full_costmap: True
planner_server: planner_server:
@@ -291,8 +291,8 @@ velocity_smoother:
smoothing_frequency: 20.0 smoothing_frequency: 20.0
scale_velocities: False scale_velocities: False
feedback: "OPEN_LOOP" feedback: "OPEN_LOOP"
max_velocity: [0.26, 0.0, 1.0] max_velocity: [0.26, 0.0, 0.5]
min_velocity: [-0.26, 0.0, -1.0] min_velocity: [-0.26, 0.0, -0.5]
max_accel: [2.5, 0.0, 3.2] max_accel: [2.5, 0.0, 3.2]
max_decel: [-2.5, 0.0, -3.2] max_decel: [-2.5, 0.0, -3.2]
odom_topic: "odom" odom_topic: "odom"
@@ -105,7 +105,7 @@ controller_server:
min_vel_y: 0.0 min_vel_y: 0.0
max_vel_x: 0.26 max_vel_x: 0.26
max_vel_y: 0.0 max_vel_y: 0.0
max_vel_theta: 1.0 max_vel_theta: 0.5
min_speed_xy: 0.0 min_speed_xy: 0.0
max_speed_xy: 0.26 max_speed_xy: 0.26
min_speed_theta: 0.0 min_speed_theta: 0.0
@@ -119,7 +119,7 @@ controller_server:
decel_lim_theta: -3.2 decel_lim_theta: -3.2
vx_samples: 20 vx_samples: 20
vy_samples: 5 vy_samples: 5
vtheta_samples: 20 vtheta_samples: 40
sim_time: 1.7 sim_time: 1.7
linear_granularity: 0.05 linear_granularity: 0.05
angular_granularity: 0.025 angular_granularity: 0.025
@@ -130,9 +130,9 @@ controller_server:
stateful: True stateful: True
critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"] critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]
BaseObstacle.scale: 0.02 BaseObstacle.scale: 0.02
PathAlign.scale: 32.0 PathAlign.scale: 23.0
PathAlign.forward_point_distance: 0.1 PathAlign.forward_point_distance: 0.1
GoalAlign.scale: 24.0 GoalAlign.scale: 18.0
GoalAlign.forward_point_distance: 0.1 GoalAlign.forward_point_distance: 0.1
PathDist.scale: 32.0 PathDist.scale: 32.0
GoalDist.scale: 24.0 GoalDist.scale: 24.0
@@ -156,8 +156,8 @@ local_costmap:
plugins: ["voxel_layer", "inflation_layer"] plugins: ["voxel_layer", "inflation_layer"]
inflation_layer: inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer" plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0 cost_scaling_factor: 4.0
inflation_radius: 0.55 inflation_radius: 0.30
voxel_layer: voxel_layer:
plugin: "nav2_costmap_2d::VoxelLayer" plugin: "nav2_costmap_2d::VoxelLayer"
enabled: True enabled: True
@@ -220,8 +220,8 @@ global_costmap:
map_subscribe_transient_local: True map_subscribe_transient_local: True
inflation_layer: inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer" plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0 cost_scaling_factor: 4.0
inflation_radius: 0.55 inflation_radius: 0.30
always_send_full_costmap: True always_send_full_costmap: True
planner_server: planner_server:
@@ -291,8 +291,8 @@ velocity_smoother:
smoothing_frequency: 20.0 smoothing_frequency: 20.0
scale_velocities: False scale_velocities: False
feedback: "OPEN_LOOP" feedback: "OPEN_LOOP"
max_velocity: [0.26, 0.0, 1.0] max_velocity: [0.26, 0.0, 0.5]
min_velocity: [-0.26, 0.0, -1.0] min_velocity: [-0.26, 0.0, -0.5]
max_accel: [2.5, 0.0, 3.2] max_accel: [2.5, 0.0, 3.2]
max_decel: [-2.5, 0.0, -3.2] max_decel: [-2.5, 0.0, -3.2]
odom_topic: "odom" odom_topic: "odom"
@@ -156,8 +156,8 @@ local_costmap:
plugins: ["voxel_layer", "inflation_layer"] plugins: ["voxel_layer", "inflation_layer"]
inflation_layer: inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer" plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0 cost_scaling_factor: 4.0
inflation_radius: 0.55 inflation_radius: 0.30
voxel_layer: voxel_layer:
plugin: "nav2_costmap_2d::VoxelLayer" plugin: "nav2_costmap_2d::VoxelLayer"
enabled: True enabled: True
@@ -214,8 +214,8 @@ global_costmap:
map_subscribe_transient_local: True map_subscribe_transient_local: True
inflation_layer: inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer" plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0 cost_scaling_factor: 4.0
inflation_radius: 0.55 inflation_radius: 0.30
always_send_full_costmap: True always_send_full_costmap: True
planner_server: planner_server:
@@ -285,8 +285,8 @@ velocity_smoother:
smoothing_frequency: 20.0 smoothing_frequency: 20.0
scale_velocities: False scale_velocities: False
feedback: "OPEN_LOOP" feedback: "OPEN_LOOP"
max_velocity: [0.26, 0.0, 1.0] max_velocity: [0.26, 0.0, 0.5]
min_velocity: [-0.26, 0.0, -1.0] min_velocity: [-0.26, 0.0, -0.5]
max_accel: [2.5, 0.0, 3.2] max_accel: [2.5, 0.0, 3.2]
max_decel: [-2.5, 0.0, -3.2] max_decel: [-2.5, 0.0, -3.2]
odom_topic: "odom" odom_topic: "odom"