fix(minco_ws): 限速三层对齐到 0.50/0.40/0.50,并让 launch 能覆盖 max_vy/max_vyaw

两处问题:

1. 静默截断:planner 0.80 / controller max_vx 0.80、max_vyaw 1.20
   → 代码硬限 kMaxVYawLimit=1.0 → 底盘 max_vx_m_s/max_wz_rad_s=0.5
   实际最大 vx 0.5、wz 0.5,而上游以为自己是 0.8/1.2。
   现将 planner(manager/optimization) 与 controller 统一为 0.50/0.40/0.50,
   与 chassis_serial.yaml 一致;提速须三层一起抬。

2. max_vel 只砍前进:run_vehicle.launch.py 的 parameters 里只有 'max_vx',
   max_vy/max_vyaw 从未被 launch 传过,一直吃 yaml 值。
   新增 max_vy(0.40)/max_vyaw(0.50) 两个参数并映射进 closed_loop_controller,
   vehicle_bringup 同步声明与透传。
This commit is contained in:
walunt5
2026-10-20 15:44:13 +08:00
parent 28e6e675cd
commit e463194edc
4 changed files with 26 additions and 7 deletions
@@ -9,7 +9,13 @@ closed_loop_controller:
heading_error_threshold: 0.6
kp_pos: 0.8
kp_yaw: 1.5
max_vx: 0.80
# ⚠️ 必须 <= 底盘限幅(techx_r2_chassis_control/config/chassis_serial.yaml 的
# max_vx_m_s / max_vy_m_s / max_wz_rad_s,当前均为 0.5)。
# 超出的部分会被底盘**静默截断**:控制器以为自己在跟 0.8,实际只发到 0.5,
# 表现为跟踪误差累积、到点附近反复修正。
# 改这里之前先确认底盘能力;要提速就两边一起抬。
max_vx: 0.50
max_vy: 0.40
max_vyaw: 1.20
# 另有代码侧硬上限 closed_loop_controller.cpp 的 kMaxVYawLimit = 1.0,此处须 <= 1.0
max_vyaw: 0.50
finish_dist: 0.15
@@ -69,7 +69,8 @@ scan_planner_node:
grid_map.show_occ_time: false
# ---- 速度/加速度(不得超过底盘能力)--------------------------------
manager.max_vel: 0.80
# 0.50 = chassis_serial.yaml 的 max_vx_m_s,保持三处一致,避免静默截断
manager.max_vel: 0.50
manager.max_acc: 0.60
manager.max_jerk: 4.0
manager.control_points_distance: 0.2
@@ -81,6 +82,6 @@ scan_planner_node:
optimization.lambda_feasibility: 0.1
optimization.lambda_fitness: 1.0
optimization.dist0: 0.2
optimization.max_vel: 0.80
optimization.max_vel: 0.50
optimization.max_acc: 0.60
optimization.order: 3
@@ -33,6 +33,8 @@ def generate_launch_description():
navi_mode = LaunchConfiguration('navi_mode')
max_vel = LaunchConfiguration('max_vel')
max_acc = LaunchConfiguration('max_acc')
max_vy = LaunchConfiguration('max_vy')
max_vyaw = LaunchConfiguration('max_vyaw')
collision_radius = LaunchConfiguration('collision_radius')
body_height = LaunchConfiguration('body_height')
cloud_topic = LaunchConfiguration('cloud_topic')
@@ -43,10 +45,14 @@ def generate_launch_description():
DeclareLaunchArgument(
'navi_mode', default_value='1',
description='1=纯局部(无图);2=keypoints 引导;3=PCT 全局路线'),
DeclareLaunchArgument('max_vel', default_value='0.80',
description='规划/控制速度上限 [m/s]'),
DeclareLaunchArgument('max_vel', default_value='0.50',
description='规划/控制**前进**速度上限 [m/s],同时约束 manager/optimization'),
DeclareLaunchArgument('max_acc', default_value='0.60',
description='加速度上限 [m/s^2]'),
DeclareLaunchArgument('max_vy', default_value='0.40',
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',
@@ -93,6 +99,8 @@ def generate_launch_description():
output='screen',
parameters=[controllers_yaml, {
'max_vx': ParameterValue(max_vel, value_type=float),
'max_vy': ParameterValue(max_vy, value_type=float),
'max_vyaw': ParameterValue(max_vyaw, value_type=float),
}],
remappings=[
('body_pose', body_odom_topic),
@@ -74,8 +74,10 @@ def generate_launch_description():
DeclareLaunchArgument('scan_delay', default_value='5.0',
description='等点云/odom 有数据的秒数'),
DeclareLaunchArgument('navi_mode', default_value='1'),
DeclareLaunchArgument('max_vel', default_value='0.80'),
DeclareLaunchArgument('max_vel', default_value='0.50'),
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('cloud_topic',
@@ -155,6 +157,8 @@ def generate_launch_description():
'navi_mode': LaunchConfiguration('navi_mode'),
'max_vel': LaunchConfiguration('max_vel'),
'max_acc': LaunchConfiguration('max_acc'),
'max_vy': LaunchConfiguration('max_vy'),
'max_vyaw': LaunchConfiguration('max_vyaw'),
'collision_radius': LaunchConfiguration('collision_radius'),
'body_height': LaunchConfiguration('body_height'),
'cloud_topic': LaunchConfiguration('cloud_topic'),