1
0
forked from zbw/yiliao2026

目前实现较快速从原点到达某个点,但是然后回到原点时有较大问题

This commit is contained in:
2026-07-22 17:37:07 +08:00
parent 9b06d149d5
commit 90761b40b2
49 changed files with 120143 additions and 63 deletions

View File

@@ -0,0 +1,66 @@
grid_astar_theta_planner:
ros__parameters:
use_sim_time: false
# Odom-only real-robot test:
# - /odom is the only localization source.
# - planner_odom_map_tf publishes map->odom from the provided start pose.
# - /map is optional static geometry from nav2_map_server; no lidar/AMCL is used.
map_frame: map
odom_topic: /odom
goal_pose_topic: /goal_pose
obstacles_topic: /random_obstacles
clear_obstacles_topic: /clear_random_obstacles
cancel_topic: /navigation_cancel
costmap_topic: /map
plan_topic: /plan
status_topic: /hybrid_astar_status
# real_10x10.yaml fallback bounds. When /map arrives, exact map bounds are
# applied because fit_map_to_costmap is true.
map_min_x: -5.0
map_min_y: -5.0
map_max_x: 5.0
map_max_y: 5.0
# A 10 cm planning grid keeps odom-only real-vehicle planning responsive
# over the full 10 x 10 m test area. The map remains used for collision
# checks at its native resolution.
resolution: 0.10
fit_map_to_costmap: true
obstacle_format: xyr
default_obstacle_radius: 0.15
unknown_obstacle_radius: 0.15
accumulate_obstacles: false
obstacle_merge_distance: 0.20
robot_radius: 0.14
localization_error: 0.05
latency_margin: 0.03
safety_margin: 0.06
costmap_occupied_threshold: 50
unknown_is_obstacle: true
outside_costmap_is_obstacle: true
inflate_static_map: true
min_turning_radius: 0.25
yaw_bins: 36
primitive_length: 0.12
collision_sample_step: 0.03
goal_xy_tolerance: 0.06
goal_yaw_tolerance: 0.174533
require_goal_yaw: false
use_grid_heuristic: true
heuristic_weight: 1.35
goal_yaw_heuristic_weight: 0.0
reverse_penalty: 1.5
turn_penalty: 0.05
gear_change_penalty: 0.25
steering_change_penalty: 0.02
max_iterations: 200000
planning_timeout_ms: 1500.0
replan_rate: 2.0
plan_on_obstacle_update: true
max_odom_age: 0.80
tf_timeout: 0.10
state_log_period: 1.0
search_progress_log_period_ms: 500.0