实现了yaw轴的转动,mid360参数更加接近实际的参数

This commit is contained in:
mzx committed 2026-11-25 21:22:13 +08:00
1 parent 72f407c110
commit 96445bd5f1
61 files changed
+2460 -235

No files matched your search

+6 -4
View File
@@ -3,18 +3,20 @@
| 文件 | 说明 |
|---|---|
| `nav2_params.yaml` | Nav2 全部参数(代价地图、MPPI 控制器、AMCL、行为树…) |
| `field_cloud.yaml` | 建图、定位与录制共用的比赛场地 XYZ 裁剪范围 |
| `sentry.rviz` | RViz 布局(Map / LaserScan / TF / Costmap 已配好) |
## nav2_params.yaml 里改过的关键项
| 参数 | 值 | 为什么 |
|---|---|---|
| `footprint` | `[[0.325,0.270],[0.325,-0.270],[-0.325,-0.270],[-0.325,0.270]]` | 车体 0.578×0.521 实测 |
| `inflation_radius` | `0.45`(默认 0.70 会把 12×8 场地填死) | 场地太小 |
| `footprint` | `[[0.305,0.305],[0.305,-0.305],[-0.305,-0.305],[-0.305,0.305]]` | 0.61×0.61 正方形:必须覆盖云台 yaw 的扫掠圆(半径 0.3021 m,见 `src/sentry_sim/urdf/README.md`) |
| `inflation_radius` | `0.60`(默认 0.70 会把 12×8 场地填死;0.45 太贴障碍) | 场地太小 + 矩形底盘要留转向余量 |
| `consider_footprint` | `true` | 与矩形 footprint 对齐,否则 MPPI 判碰撞不一致 |
| `enable_stamped_cmd_vel` | `false`(**8 处**:bt_navigator / controller_server / behavior_server / route_server / velocity_smoother / collision_monitor / docking_server / following_server) | 本版本默认发 TwistStamped,而 ros_gz 桥只认 Twist |
| `default_server_timeout` / `wait_for_service_timeout` | `15000` | 本机启动慢,否则 BT 建树失败 |
| local costmap `plugins` | 只有 `inflation_layer` | 2D 雷达会扫到车身自身,参与代价地图会把自己围死 |
| global costmap `plugins` | `static_layer` + `inflation_layer` | 场地是静态的,用地图就够 |
| local costmap `plugins` | `static_layer`、`voxel_layer`、`inflation_layer` | 静态栅格和自滤后的实时点云 |
| global costmap `plugins` | `static_layer`、`obstacle_layer`、`inflation_layer` | 使用同一份自滤点云处理动态障碍 |
| 障碍标记 / 清障距离 | 4.5 m / 8 m | 避障距离独立于原始雷达的 40 m 量程 |
> 改之前先看一眼注释,里面写了每处的原因。
+4
View File
@@ -0,0 +1,4 @@
/**:
ros__parameters:
map_crop_min: [-6.4, -4.4, -0.10]
map_crop_max: [6.4, 4.4, 0.65]
+5 -5
View File
@@ -13,7 +13,7 @@ amcl:
global_frame_id: "map"
lambda_short: 0.1
laser_likelihood_max_dist: 2.0
laser_max_range: 12.0 # 雷达量程 12 m(真机 40 m),写 100 会把虚警算成有效
laser_max_range: 8.0 # /scan2d 的导航观测距离
laser_min_range: 0.15 # 自击点已被 self_filter 在投影时剔除,不用靠 0.6 遮挡
laser_model_type: "likelihood_field"
max_beams: 60
@@ -275,7 +275,7 @@ local_costmap:
width: 6
height: 6
resolution: 0.05
footprint: "[[0.325, 0.270], [0.325, -0.270], [-0.325, -0.270], [-0.325, 0.270]]"
footprint: "[[0.305, 0.305], [0.305, -0.305], [-0.305, -0.305], [-0.305, 0.305]]"
# MID-360 的 3D 点云已接入(/scan/points,PointCloud2)
# MID-360 点云经 sentry_nav/self_filter 自滤(剔除车身包围盒内的点)后接入
# Retain known thin/occluded geometry when the live cloud sparsely samples it.
@@ -298,7 +298,7 @@ local_costmap:
obstacle_min_range: 0.20
obstacle_max_range: 4.5
raytrace_min_range: 0.20
raytrace_max_range: 12.0
raytrace_max_range: 8.0
clearing: True
marking: True
filters: ["keepout_filter"]
@@ -325,7 +325,7 @@ global_costmap:
publish_frequency: 1.0
global_frame: map
robot_base_frame: base_link
footprint: "[[0.325, 0.270], [0.325, -0.270], [-0.325, -0.270], [-0.325, 0.270]]"
footprint: "[[0.305, 0.305], [0.305, -0.305], [-0.305, -0.305], [-0.305, 0.305]]"
resolution: 0.05
track_unknown_space: true
plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
@@ -341,7 +341,7 @@ global_costmap:
obstacle_min_range: 0.20
obstacle_max_range: 4.5
raytrace_min_range: 0.20
raytrace_max_range: 12.0
raytrace_max_range: 8.0
clearing: True
marking: True
filters: ["keepout_filter", "speed_filter"]