Repository navigation
feat(ground): 新增 ride_comfort_transmissibility,把「乘坐舒适性」做成可离线校验的传递率曲线与等级判定 - #1252
Merged
xingwunian merged 6 commits intoNov 11, 2026
Merged
Conversation
This was referenced Nov 11, 2026
# Conflicts: # docs/index.md
xingwunian
approved these changes
Nov 11, 2026
xingwunian
left a comment
Contributor
There was a problem hiding this comment.
按贡献指南第 8 节本地核对过(git fetch origin pull/1252/head → 逐文件看 → 跑离线测试),没有阻断问题,可以合。
- 把
master(2d9653ad,已含 #1246/#1249/#1250)合进本分支,冲突在docs/index.md(mkdocs.yml自动合并成功) - 本 PR 的 hunk 把 master 已有的「VRU 冲突风险图」入口删了,而且「乘坐舒适性传递率」自己没进导航。已改成保留 master 全部入口,再把本模块加进
mkdocs.yml导航与首页链接(./ground/ride_comfort_transmissibility.md) tests/test_ride_comfort_transmissibility_local.py本地跑:通过 112 项,失败 0 项(结论 PASSED)- 相对 master 的净变化 1208 行新增、0 行删除;
catkin_install_python三个脚本齐全,包内只依赖math
代码逻辑没动,只补了合并与导航。按贡献指南用 Squash and merge。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改概述
新增
src/ground/ride_comfort_transmissibility模块:计算单自由度悬架在路面正弦激励下的传递率,给出共振频率、峰值倍率、按 ISO 2631-1 的舒适度等级,并用「共振位置 / 峰值倍率 / 高频衰减 / 输入线性」
四条断言把曲线钉住。纯标准库实现,不需要 CARLA、不需要显示器。
配套新增
docs/ground/ride_comfort_transmissibility.md文档页。修改的详细描述
1. 为什么需要这个包
仓库里地面载具模块在纵向(
braking_distance_check)、横向(rollover_margin、lateral_stability_margin)、执行器(steering_actuator_lag)都有覆盖,垂直方向是空白:
braking_distance_checkrollover_marginlateral_stability_marginsteering_actuator_lag一条真实的工程链条:悬架把路面震动放大 → 人难受 → 驾驶员反应变慢 → 制动距离变长。
前面几个模块都默认「驾驶员状态正常」,本模块补上这个前提被破坏时的量化依据。
2. 模型
峰值不在 r = 1:r = 1 处 T = 2.236,真正的极值在 r = 0.935,T = 2.280。
阻尼越大偏得越多,所以判据写的是「峰位」而不是直接拿 r = 1 当峰。
damping限制在(0, 1/√2):超过 0.7071 后sqrt(1−2ζ²)无实数意义、闭式峰位失效,程序抛
RideError而不是给一个错的数(测试 G15 覆盖)。3. 四条断言
sqrt(1−2ζ²)偏差 ≤ 0.02T(r=10) ≤ 0.1a_w精确加倍4. 默认数字
fn_hz = 1.2、ζ = 0.25、a_in = 0.5、f = 6.0:T(1)/T(10)a_w5. 参数与话题
12 个参数:
/suspension/{fn_hz,damping}、/road/{input_accel,freq_hz}、/check/{pos_tolerance,peak_tolerance,high_freq_limit,linear_tolerance}、/scan/{low,high,steps}、/rate/publish_hz。三路 latched 话题:
/ride/report(String)、/ride/curve(Float64MultiArray,10 组
[r, T, a_w])、/ride/peak(Float64MultiArray,[理论峰位, 理论峰值, 扫描峰位, 扫描峰值, 激励处 a_w])。6. 结构约定
config/+launch/main.launch+scripts/{main,*_core,*_node}.py+tests/test_*_local.pydocs/ground/*.md;*_core.py不 import rospy,*_node.py用_log()把消息 encode 成 byte str。7. 自查修掉的两处
T_p = 1/(2ζ√(1−ζ²)),与真实曲线峰值差 10.53%,直接顶穿 5% 容差。改成「在
r_p处取值」的闭式sqrt((1+4ζ²(1−2ζ²))/(4ζ²(1−ζ²)))= 2.280351,与扫描峰 2.283149 只差 0.12%。
sqrt(1−2ζ²)变虚数,原实现走特判分支导致三条断言假失败。改成构造期直接判参数非法,语义更清楚。
8. 没改动什么
没有修改既有模块、
mkdocs.yml、docs/index.md。docs/ground/ride_comfort_transmissibility.md是新增文件。测试
Ubuntu 18.04 + ROS Melodic(Python 2.7.17):
通过 112 项,失败 0 项。11 组:A 传递率基本形 / B 闭式峰位峰值 / C 舒适等级 /
D 四条断言正反例 / E 扫描表 / F 字符图 / G 参数与非法值 / H 报告排版 / I 闭式恒等式 /
J 工程约定 / K 编码声明回归。
运行效果
断言:4 通过 / 0 失败(共 4 条)、结论:PASSED。pos_tolerance:=0.001只翻「共振位置」;damping:=0.02 freq_hz:=1.2峰值飙到 25 倍、等级变成「无法忍受」,但四条断言仍全过 —— 断言管自洽、等级管体感。
图 1 离线测试通过 112 项

图 2 默认

结论:PASSED(峰值 2.2804、等级「舒适」)图 3

pos_tolerance:=0.001只翻「共振位置」图 4

damping:=0.02 freq_hz:=1.2等级「无法忍受」、断言仍全过图 5 终端 B 三条

rosparam get回显所使用具体的大模型声明
使用大模型辅助代码编写、测试编写与文档整理,提交内容由本人负责。