From 54218711dd0343aa84cd4d7a8566dfac0405fd1c Mon Sep 17 00:00:00 2001 From: walunt5 Date: Sat, 24 Oct 2026 21:47:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(minco=5Fws):=20=E6=8C=89=E5=AE=9E=E8=BD=A6?= =?UTF-8?q?=E5=87=A0=E4=BD=95=E6=A0=87=E5=AE=9A=E2=80=94=E2=80=94=E9=9B=B7?= =?UTF-8?q?=E8=BE=BE=20IP=20.110=E3=80=81=E7=9B=B2=E5=8C=BA=E7=90=83=200.6?= =?UTF-8?q?=E3=80=81=E8=BD=A6=E4=BD=93=20R=3D0.53/H=3D0.41=E3=80=81?= =?UTF-8?q?=E5=9C=B0=E9=9D=A2=20z=3D-0.55?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实测:雷达装车体正中央、离地 0.48 m、比车体旋转中心靠前 1.5 cm; 车体最高点 0.41 m、近似圆形半径 0.53 m。 - MID360_config.json:雷达实际 IP 为 192.168.1.110(非模板里的 .196), 上位机为 .50;4 处 host IP 与 lidar ip 一并修正。 - mid360.yaml:blind 0.35→0.6(车顶外沿到雷达 √(0.53²+0.07²)≈0.535,0.35 盖不住, 自遮挡会进点云被当障碍);blind_center 归零(雷达居中,原 y=0.20 无依据)。 球心/半径均在**雷达系**下。 - body_odom.yaml:offset_x=-0.015、offset_z=-0.23(=-0.48+0.25)。 - planner_vehicle.yaml:double_cylinder_radius 0.30→0.53、offset 0.20→0.0 (车体是圆,offset 非零会把 footprint 变成 1.46 m 胶囊导致窄道误判)、 body_height 0.50→0.41、ground_height 0.0→-0.55 (实测反推地面 z≈-0.513:body_pose.z=-0.263 减 offset_z -0.23 ⇒ 雷达初始 z≈-0.033, 与 extrinsic_T 的 IMU z=+0.044 吻合);填 0 会切掉地面以上半米,矮障碍全部漏检。 - step_blocker.yaml:z_min 0.0→-0.50,台阶墙要从地面砌起。 - 两个 launch:collision_radius/body_height 默认值同步为 0.53/0.41。 launch 参数优先级高于 yaml,三处必须同改。 --- .../src/perception/Point-LIO/config/mid360.yaml | 8 ++++++-- .../livox_ros_driver2/config/MID360_config.json | 10 +++++----- .../src/scan/body_odom/config/body_odom.yaml | 7 +++++-- .../plan_manage/config/planner_vehicle.yaml | 17 ++++++++++++----- .../plan_manage/launch/run_vehicle.launch.py | 6 +++--- .../launch/vehicle_bringup.launch.py | 4 ++-- .../scan/step_blocker/config/step_blocker.yaml | 4 +++- 7 files changed, 36 insertions(+), 20 deletions(-) diff --git a/minco_ws/src/perception/Point-LIO/config/mid360.yaml b/minco_ws/src/perception/Point-LIO/config/mid360.yaml index 757e0cb..f2c3c6f 100755 --- a/minco_ws/src/perception/Point-LIO/config/mid360.yaml +++ b/minco_ws/src/perception/Point-LIO/config/mid360.yaml @@ -35,9 +35,13 @@ lidar_type: 1 # 1 for Livox serials LiDAR, 2 for Velodyne LiDAR, 3 for ouster LiDAR scan_line: 4 timestamp_unit: 3 # the unit of time/t field in the PointCloud2 rostopic: 0-second, 1-milisecond, 2-microsecond, 3-nanosecond. - blind: 0.35 + # 盲区球:剔除车体自身点云。球心与半径都在**输入点云坐标系(雷达系)**下。 + # 车体是半径 0.53 m 的圆、雷达装正中央且高出车顶 0.07 m, + # 车顶外沿到雷达距离 = √(0.53² + 0.07²) ≈ 0.535 m,故半径取 0.6 才能盖住。 + # 原值 0.35 盖不住,且 blind_center 的 y=0.20 在"雷达居中"布局下无依据。 + blind: 0.6 blind_center_enable: True - blind_center: [ 0.0, 0.20, 0.0 ] + blind_center: [ 0.0, 0.0, 0.0 ] mapping: imu_en: True diff --git a/minco_ws/src/perception/livox_ros_driver2/config/MID360_config.json b/minco_ws/src/perception/livox_ros_driver2/config/MID360_config.json index b03fc6c..70de9eb 100755 --- a/minco_ws/src/perception/livox_ros_driver2/config/MID360_config.json +++ b/minco_ws/src/perception/livox_ros_driver2/config/MID360_config.json @@ -11,13 +11,13 @@ "log_data_port": 56500 }, "host_net_info" : { - "cmd_data_ip" : "192.168.1.47", + "cmd_data_ip" : "192.168.1.50", "cmd_data_port": 56101, - "push_msg_ip": "192.168.1.47", + "push_msg_ip": "192.168.1.50", "push_msg_port": 56201, - "point_data_ip": "192.168.1.47", + "point_data_ip": "192.168.1.50", "point_data_port": 56301, - "imu_data_ip" : "192.168.1.47", + "imu_data_ip" : "192.168.1.50", "imu_data_port": 56401, "log_data_ip" : "", "log_data_port": 56501 @@ -25,7 +25,7 @@ }, "lidar_configs" : [ { - "ip" : "192.168.1.196", + "ip" : "192.168.1.110", "pcl_data_type" : 1, "pattern_mode" : 0, "extrinsic_parameter" : { diff --git a/minco_ws/src/scan/body_odom/config/body_odom.yaml b/minco_ws/src/scan/body_odom/config/body_odom.yaml index 780a44b..6f1359e 100644 --- a/minco_ws/src/scan/body_odom/config/body_odom.yaml +++ b/minco_ws/src/scan/body_odom/config/body_odom.yaml @@ -14,8 +14,11 @@ body_odom: ros__parameters: input_topic: /aft_mapped_to_init output_topic: /body_odom - offset_x: 0.0 + # 雷达比车体旋转中心**靠前 1.5 cm**(dx = +0.015)⇒ 车体中心在雷达系下 x = -0.015 + offset_x: -0.015 offset_y: 0.0 - offset_z: 0.0 + # 雷达离地 0.48 m,碰撞参考高度取 0.25 m(离地): + # offset_z = -0.48 + 0.25 = -0.23 + offset_z: -0.23 offset_yaw: 0.0 child_frame_id: base_link diff --git a/minco_ws/src/scan/plan_manage/config/planner_vehicle.yaml b/minco_ws/src/scan/plan_manage/config/planner_vehicle.yaml index 80fd437..b68a490 100644 --- a/minco_ws/src/scan/plan_manage/config/planner_vehicle.yaml +++ b/minco_ws/src/scan/plan_manage/config/planner_vehicle.yaml @@ -33,16 +33,23 @@ scan_planner_node: grid_map.map_sliding_thresh: 0.2 # ---- 车体碰撞模型(轮式,按实车量)---------------------------------- - # 双圆柱:两个半径 0.30 m 的圆,圆心沿车体 x 前后各偏 0.20 m - grid_map.double_cylinder_radius: 0.30 - grid_map.double_cylinder_offset: 0.20 - grid_map.body_height: 0.50 + # 车体近似为**圆形**:半径 0.53 m(实测)。 + # 代码里 footprint 是胶囊:front = pos + offset·heading,rear = pos - offset·heading, + # 总长 = 2·offset + 2·radius。车体是圆,故 offset 必须为 0,退化为单圆柱; + # 若沿用 0.20,footprint 会变成 1.46 m × 1.06 m,远处的窄道会被误判过不去。 + grid_map.double_cylinder_radius: 0.53 + grid_map.double_cylinder_offset: 0.0 + grid_map.body_height: 0.41 grid_map.obstacles_inflation_z_up: 0.15 grid_map.obstacles_inflation_z_down: 0.05 grid_map.frame_id: world grid_map.sliding_map_frame_id: sliding_map - grid_map.ground_height: 0.0 + # 体素地图底面。实测反推:Point-LIO 世界原点不在光心,而在其上方约 3.3 cm + # (scan_planner 打印 body_pose.z = -0.263,减去 offset_z -0.23 ⇒ 雷达初始 z ≈ -0.033; + # 与 extrinsic_T 的 IMU z=+0.044 吻合)。雷达离地 0.48 m + # ⇒ 地面 z ≈ -0.033 - 0.48 = -0.513,取 -0.55 留余量,避免切掉地面附近的矮障碍。 + grid_map.ground_height: -0.55 grid_map.sensor_type: lidar # 点云已经是世界系(Point-LIO 的 /cloud_registered)⇒ 不需要外参 grid_map.cloud_is_world: true diff --git a/minco_ws/src/scan/plan_manage/launch/run_vehicle.launch.py b/minco_ws/src/scan/plan_manage/launch/run_vehicle.launch.py index 68f4ff3..40b5de0 100644 --- a/minco_ws/src/scan/plan_manage/launch/run_vehicle.launch.py +++ b/minco_ws/src/scan/plan_manage/launch/run_vehicle.launch.py @@ -53,9 +53,9 @@ def generate_launch_description(): description='横向平移速度上限 [m/s]。max_vel 不覆盖此项,需单独给'), DeclareLaunchArgument('max_vyaw', default_value='0.50', description='转向角速度上限 [rad/s]。受代码硬上限 1.0 约束,且须 <= 底盘 max_wz_rad_s'), - DeclareLaunchArgument('collision_radius', default_value='0.30', - description='双圆柱碰撞半径 [m]'), - DeclareLaunchArgument('body_height', default_value='0.50', + DeclareLaunchArgument('collision_radius', default_value='0.53', + description='碰撞半径 [m],实测车体圆形半径'), + DeclareLaunchArgument('body_height', default_value='0.41', description='车体高度 [m],用于障碍 z 向膨胀'), DeclareLaunchArgument('cloud_topic', default_value='/cloud_registered', description='世界系点云话题(Point-LIO 输出)'), diff --git a/minco_ws/src/scan/plan_manage/launch/vehicle_bringup.launch.py b/minco_ws/src/scan/plan_manage/launch/vehicle_bringup.launch.py index f7cbf17..75e0385 100644 --- a/minco_ws/src/scan/plan_manage/launch/vehicle_bringup.launch.py +++ b/minco_ws/src/scan/plan_manage/launch/vehicle_bringup.launch.py @@ -78,8 +78,8 @@ def generate_launch_description(): DeclareLaunchArgument('max_acc', default_value='0.60'), DeclareLaunchArgument('max_vy', default_value='0.40'), DeclareLaunchArgument('max_vyaw', default_value='0.50'), - DeclareLaunchArgument('collision_radius', default_value='0.30'), - DeclareLaunchArgument('body_height', default_value='0.50'), + DeclareLaunchArgument('collision_radius', default_value='0.53'), + DeclareLaunchArgument('body_height', default_value='0.41'), DeclareLaunchArgument('cloud_topic', default_value='/cloud_registered_for_scan', description='送进 SCAN 的点云(默认经过 step_blocker)'), diff --git a/minco_ws/src/scan/step_blocker/config/step_blocker.yaml b/minco_ws/src/scan/step_blocker/config/step_blocker.yaml index 2bc693d..cf47632 100644 --- a/minco_ws/src/scan/step_blocker/config/step_blocker.yaml +++ b/minco_ws/src/scan/step_blocker/config/step_blocker.yaml @@ -25,7 +25,9 @@ step_blocker: wall_height: 2.0 # 墙的高度 [m],要高于车体 + 规划余量 cell_size: 0.10 # 点阵间距 [m];越小越密、越耗 CPU - z_min: 0.0 # 墙的起始高度 [m] + # 墙的起始高度。camera_init 原点在雷达初始位置(离地 0.48 m),地面在 z ≈ -0.48, + # 所以要从 -0.50 起,否则墙悬空、地面到 0.48 m 之间的台阶立面堵不住。 + z_min: -0.50 # 输入点云超过这个数就等间隔抽稀,避免 Python 端跟不上 max_input_points: 200000